Julio Luiz Vedovatto Neto wrote:

My code:
BaseFont font = BaseFont.createFont("/home/julio/Primer.ttf",BaseFont.CP1252,BaseFont.NOT_EMBEDDED);
Font fonte = new Font(font, cb.getFonte_size(), Font.NORMAL);
the primer font is a test font ok?

This code should work
- if the file Primer.ttf is present in directory /home/julio
 be careful with the cases (aren't files lowercase only)
and with the permissions (does the application server have access to the file)
- if Primer.ttf is a supported ttf font
 it could be an OpenType font with TrueType outlines
 or a Windows TrueType font.
 I don't think Mac TrueType fonts work.
Observe that BaseFont.NOT_EMBEDDED will be ignored:
when using a ttf, a subset of the font is always embedded.

It also doesn't make sense to create the font with Font.NORMAL.
For instance: if you want to work with Arial you need the following font files:
* arial.ttf -> normal
* arialbd.ttf -> bold
* ariali.ttf -> italic
* arialbi.ttf -> bold italic
These are 4 DIFFERENT fonts.
Arial is the font FAMILY, not the font.

Please read the tutorial on fonts before posting further questions.
br,
Bruno




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to