On Thu, 2007-09-06 at 19:22 +0100, Paulo Soares wrote:
> BaseFont.createFont("Tec-Medium.afm", ...
> 

Yes, that works very well, thank you!

> > I'm trying to load fonts from some proprietary repository (day jcr repo)
> > and thus I need to load the fonts from byte arrays. I've tried doing 
> > 
> > BaseFont tecMedium = BaseFont.createFont("Tec-Medium", 
> >  BaseFont.WINANSI, true, true,
> >  getBinaryContent(request,"/path/.../Tec-Medium.afm"),
> >  getBinaryContent(request, "/path/.../Tec-Medium.pfb"), true);
> > 
> > where getBinaryContent is a method that returns a byte[] with the data
> > given the path in the repository. 
> > 
> > However, I get encoding exceptions;
> > 
> > 
> > *ERROR*: unable to load font; 
> > com.lowagie.text.DocumentException: Font 'Tec-Regular' with 'Cp1252' is
> > not recognized.
> >        at com.lowagie.text.pdf.BaseFont.createFont(BaseFont.java:529)
> > 
> > Looking into the afm file I see among other things
> > 
> > ..
> > FontName Tec-Medium
> > FullName Tec-Medium
> > FamilyName Tec-Medium
> > ...
> > EncodingScheme FontSpecific
> > ..
> > 
> > Is any of this relevant? any clues why I cannot get my fonts loaded?

-- 
Torgeir Veimo <[EMAIL PROTECTED]>


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to