I've loaded the fonts using
BaseFont.createFont("file.ttf",BaseFont.IDENTITY_H,true);
The last parameter says that this font should be embedded in the
document, isn't it?

Do i need explicitly embed the fonts above this?

2009/1/24 Leonard Rosenthol <leona...@pdfsages.com>:
> Not only do you have to pick a font where those characters (glyphs) exist in
> teh font - BUT you also need to embed the font in the PDF so that everyone
> can see them...
>
> Leonard
>
> 2009/1/24 Balázs Grill <balag...@gmail.com>
>>
>> Hi!
>>
>> I tried to create PDFs in hungarian language therefore it contains
>> characters such as ő (\u0151) or ű(\u071). These characters are not
>> displayed in the resulting PDF.
>>
>> I created a snippet, which tries to add such characters to the
>> document. Am i doing it wrong?
>>
>> public static void main(String[] args) {
>>                System.out.println("Start");
>>                Document document = new Document(PageSize.A4, 50, 50, 50,
>> 50);
>>        try {
>>                // step 2
>>            PdfWriter.getInstance(document, new
>> FileOutputStream("encoding.pdf"));
>>            // step 3
>>            document.open();
>>            // step 4
>>            String text = "Árvíztűrő tükörfúrógép
>> .\u0150\u0151\u0170\u0171.";
>>            document.add(new Paragraph(text,
>> FontFactory.getFont(FontFactory.TIMES, 10, Font.NORMAL)));
>>        }
>>        catch (Exception de) {
>>            de.printStackTrace();
>>        }
>>        // step 5
>>        document.close();
>>        System.out.println("Done.");
>> }
>>
>> I tried to use third-party ttf (and otf) font files, thinking that
>> maybe the built-in font files does not contain these characters. The
>> font files are loaded and used perfectly, except the mentioned
>> characters. Could someone help me solving the problem?
>>
>> Thanks
>>
>> Balage;
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by:
>> SourcForge Community
>> SourceForge wants to tell your story.
>> http://p.sf.net/sfu/sf-spreadtheword
>> _______________________________________________
>> 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
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> _______________________________________________
> 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
>

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
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

Reply via email to