JasperReports 5.6: Could not load the following font

前端 未结 5 1029
梦如初夏
梦如初夏 2021-01-05 02:01

I am facing the problem, that JasperReports still cannot find the Arial font.

I created a simple Maven Project with following structure and included it to

5条回答
  •  滥情空心
    2021-01-05 02:56

    You must give the correct name of font for the PDF exporter. Your fonts are presents into the embedded fonts jar. You don't need to put them again into the classes directory ;-)

    There is the correct fonts.xml content for pdf exporter (perhaps the names are case sensitive, be careful) :

    
    
    
        
          fonts/Arial/ARIAL.TTF
          fonts/Arial/ARIAL.TTF
        
        
          fonts/Arial/ARIALBD.TTF
          fonts/Arial/ARIALBD.TTF
        
        
          fonts/Arial/ARIALI.TTF
          fonts/Arial/ARIALI.TTF
        
        
          fonts/Arial/ARIALBI.TTF
          fonts/Arial/ARIALBI.TTF
        
        Cp1252
        true
        
        
    
    
    

    I hope this help.

    Regards, T.

提交回复
热议问题