BaseFont.createFont("c:\\windows\\fonts\\msgothic.ttc,0", ...

Or you can use FontFactory to call the fonts by name.

----- Original Message ----- 
From: "Yann" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, June 10, 2005 4:47 PM
Subject: [iText-questions] Use "exotic fonts" in templates


> Hi,
>
> How can I use "exotic fonts" (japanese, chinese...) in templates ?
>
> I'd like to use the FontFactory but it doesn't seem to be possible :
>
> template.beginText();
> Font font = FontFactory.getFont("MS UI Gothic", BaseFont.IDENTITY_H,
> BaseFont.EMBEDDED, 12);
> // Unfortunatly impossible !
> template.setFontAndSize(font , 12);
> template.setTextMatrix(100, 100);
> template.showText("\u304a\u3081");
> template.endText();
>
> After that I tried :
>
> template.beginText();
> BaseFont font = BaseFont.createFont("c:\\windows\\fonts\\msgothic.ttc",
> BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
> template.setFontAndSize(font, 12);
> template.setTextMatrix(100, 100);
> template.showText("\u304a\u3081");
> template.endText();
>
> But it throws an Exception :
> Font 'c:\windows\fonts\msgothic.ttc' with 'Identity-H' is not recognized.
>
> Is there a way to do that ?
> Thanks.
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you
shotput
> a projector? How fast can you ride your desk chair down the office luge
track?
> If you want to score the big prize, get to know the little guy.
> Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to