> -----Original Message-----
> From: Jianhua Jin [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, September 19, 2002 1:56
> To:   [EMAIL PROTECTED]
> Subject:      [iText-questions] reading font from InputStream
> 
> it possible to add a method in class BaseFont as
> follows?
> public static BaseFont creatFont(InputStream in),
> 
> I would then be able to include a ttf file in my jar
> file and then read the ttf with
> BaseFont.creatFont(ClassLoader.getResourceAsStream(ttfFileName));
> 
> This is better than having the ttf file on the file
> system (in which case you have to keep track of the
> path for the ttf files in your application). 
> 
        You don't need this, read the file to a byte array.

> Another question: 
> 
> How exactly can I use the method
> BaseFont.creatFont(String, String, boolean, boolean,
> byte[], byte[])? If I read the ttf file as byte array,
> can I (or how can I) use the array in this method?
> 
        For example:

        byte b[] = read_the_font_from_somewhere();
        BaseFont.createFont("some_dummy_name.ttf", BaseFont.CP1252, true,
true, b, null);

        Best Regards,
        Paulo Soares

> Thanks.
> 


-------------------------------------------------------
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