I attempted to embed fonts as follows (all fonts are
ttf files from Winnt/fonts in Windows. the font used
was ariblk.ttf, Arial black). But I get an error from
Acrobat Reader "Unable to extract embeded font
'CBDCEE+ariblk.ttf'. Some chatracter may not display
or print correctly". Where did I do wrong? Could you
explain more on how to use the method
BaseFont.creatFont(String, String, boolean, boolean,
byte[], byte[])?

Thank you very much.

public static final BaseFont getFontFromResource
    (String fontName, String resourceName) 
    throws IOException {
        
    InputStream in=MyClass.class.getClassLoader
    ().getResourceAsStream(resourceName);

    byte[] b=new byte[in.available()];
    in.read(b);
    return BaseFont.createFont(fontName, 
       BaseFont.WINANSI, true, true, b, null);
}

__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to