I create fonts from the actual font file and use them in the PdfGraphics2D to draw text, for the pdf side I use the location of the actual font to create them, register the names, place them in the FontMapper and pass it on to the writer.

This all works fontastic.

A font (family) typically consists of four styles, regular, italic, bold and bolditalic. Usually there are four fonts like in Arial, Times, Courier a.o. containing these individual styles.

Yet my question;

Is there anyway in itext to use bold and italic for a 'single' font like Microsoft Sans Serif. If I load the font and pass the styles it is only drawn regular.

I've read "The Bold, Italic an BoldItalic styles don't work with embedded fonts." "When you are using a built-in font, applying another style, changes the font.
For instance: when you are using 'Arial' and you change the style into italic, the font is replaced internally by 'Arial Italic' (which is a totally different font).
In this case you will have to embed both fonts: "arial.ttf" and "ariali.ttf"
http://itextsharp.sourceforge.net/tutorial/ch09.html but Microsoft Sans Serif is just one font.

It derives me crazy,
 
Peter


Live Search, for accurate results! Click here
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to