iReport Version : 3.7.1
I approached this problem in two ways.
My first method
I am creating a pdf
page in iReport
and I have one of the fields (from database) set to a font Gujarati-Salarl (A font for a regional language of India).
This font is available in the font list of iReport
.
When I hit preview I get the desired output , with the field in the required font style.
Everything till here is fine.
But the pdf
file generated still contains the same original font in English characters.
The result is same whether i call the report from the application or from a JAVA
file.
After a bit of study I found this , a second method
JRProperties.setProperty("net.sf.jasperreports.default.pdf.font.name", "C:\Gujrati-Saral-1.ttf");
This sets the font of the pdf
to the ttf
font provided but now the entire pdf
comes in the Guarati-saral font which is not what I am looking for..
Is there a way to specifically apply this font only to that one particular field?
or
when going by the second method is there a way to not applying the font Guarati-saral to all other fields except the required one ?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…