Paulo Soares <psoares <at> consiste.pt> writes:
>
> > -----Original Message-----
> > From: itext-questions-admin <at> lists.sourceforge.net
> > [mailto:itext-questions-admin <at> lists.sourceforge.net] On
> > Behalf Of Suprigya
> > Sent: Monday, March 22, 2004 11:32 PM
> > To: itext-questions <at> lists.sourceforge.net
> > Subject: [iText-questions] I18N Fonts
> >
>
> I assume in my answers that you are writing to a Graphics2D.
>
> > Is there a way to use java.awt.Font object for displaying text.
> > The text can be English, Chinese, Japanese or Korean and I
> > need to use the
> > applicable font.
>
> Use text as shapes in PdfGraphics2D.
>
> >
> > For example, for Korean, the font is:
> > new Font( "GulimChe", fontType, fontSize );
> >
> > How can I achieve displaying unicode text for different
> > languages using iText?
> > Do I need to register these fonts with FontFactory?Also, what
>
> You must register the fonts in DefaultFontMapper.
>
> > if the location
> > of the fonts is different for different boxes; how will it work then?
>
> You must know where the fonts are.
>
> Best Regards,
> Paulo Soares
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
>
I tried the following piece of code:
FontFactory.registerDirectory( "c:\\winnt\\fonts" );
cell = new PdfPCell( new Phrase( "\ub85c\uadf8\uc628",
FontFactory.getFont( "GulimChe", Font.BOLD, 14 ) ) );
cell.setColspan( 2 );
cell.setBorder( 0 );
pTable.addCell( cell );
However, the text does not appear in the pdf. Is there something else that I
need to do?
Do I need to use DefaultFontMapper instead? How do I get font object from it to
create phrase object?
DefaultFontMapper mapper = new DefaultFontMapper();
mapper.insertDirectory("c:\\winnt\\fonts");
DefaultFontMapper.BaseFontParameters pp = mapper.getBaseFontParameters
("GulimChe");
if (pp != null)
pp.encoding = BaseFont.IDENTITY_H;
Any help will be highly appreciated.
Thanks,
Suprigya
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions