Hi,
Hesham G. schrieb:
Hello ,
This seems an easy question, but I couldn't find an answer for it yet. I load a
font file to draw text using it, but I want to make this font italic or bold
.... How can I do that ?
PDTrueTypeFont font = PDTrueTypeFont.loadTTF( pdfFile, new File(
"fonts/georgia.TTF" ) );
font.getFontDescriptor().setItalic( true ); // Not working !!
font.getFontDescriptor().setItalicAngle(45); // Not working !!
font.getFontDescriptor().setForceBold( true ); // Not working !!
Just try to use the italic type of the wanted font. AFAIU those attributes are
only used as a description of the font and not for rendering it.
Best regards ,
Hesham
BR
Andreas Lehmkühler