Hi,
I am trying to set a Font for a paragraph using ttf files but none of the
changes take effect.
I tried the following two ways
Method 1
--------------------
FontFactory.register("c:/Windows/Fonts/ARIALBD.ttf");
Font ocrFont = FontFactory.getFont("ARIALBOLD");
BaseFont bf = ocrFont.getBaseFont();
Font ft = new Font(bf,5);
Paragraph p = new Paragraph("some string", ft);
Method 2
--------------------
BaseFont bf =
BaseFont.createFont("c:/Windows/Fonts/ARIALBI.ttf",BaseFont.CP1252,
BaseFont.EMBEDDED);
Font ft = new Font(bf,5);
Paragraph p = new Paragraph("some string", ft);
Can someone please help, I have used various fonts.
Thanks, Kazam.
--
View this message in context:
http://itext-general.2136553.n4.nabble.com/TTF-file-has-no-effect-tp2964490p2964490.html
Sent from the iText - General mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php