Hi all,
This example shows how to use polish fonts while using explicite font file
name.

I have prepared font dialog (list) using:

String[] fonts =
GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();

Using this list I would like to create PDFStamp with polish characters as
well :).

I have changed BaseFont file name to font name (which I can only obtain from
fonts list):

.....
BaseFont bf = BaseFont.createFont("Arial", BaseFont.CP1250,
BaseFont.EMBEDDED);
Font font = new Font(bf, 12);
String polish = "\u0104\u0105\u0106\u0107\u0118\u0119";

...
Of course, after this change I have got Exception:

Exception: com.lowagie.text.DocumentException: Font 'Arial' with 'Cp1250' is
not recognized.

When I have tried to change codepage for BaseFont.HELVETICA problem is the
same.

My question:

How to obtain physical filename of the font visible on the list obtained as
mentioned above?

I have searched the web but I have found only this information:

http://java.sun.com/j2se/1.4.2/docs/guide/intl/fontprop.html.


Regards
Mariusz
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to