xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Douglas" <edoug...@blockhouse.com>
Subject RE: What am I missing (loading custom font to embed)?
Date Fri, 29 Jul 2011 12:21:55 GMT
Thank you for your interest.  It had some problem reading the font in
the fop class.
I gave up trying to debug it and fixed the error by reloading the
project from a previous state. 

-----Original Message-----
From: Chris Bowditch [mailto:bowditch_chris@hotmail.com] 
Sent: Monday, July 25, 2011 8:43 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: What am I missing (loading custom font to embed)?

On 20/07/2011 21:27, Eric Douglas wrote:
>
> This was working before but I changed something in my project, I'm not

> sure what, now it crashes on the last line of this bit.
>

Crashes you say. What is the stack trace?

> *public**static**final*FopFactory/myFopFactory/=
> FopFactory./newInstance/();
>
>      TTFFontLoader myTTFLoader;
>      CustomFont myCustomFont;
>      FOUserAgent myUserAgent;
>      myUserAgent =/myFopFactory/.newFOUserAgent();
>      FontResolver fontResolver =*new*DefaultFontResolver(myUserAgent);
>      InputStream is;
>      String fontFileURI;
>      loadFontFileName = "LTYPEB.TTF";
>      is = getClass().getResourceAsStream("/resources/"+
> loadFontFileName);
>      fontFileURI = DataURLUtil./createDataURL/(is,*null*);
>      myTTFLoader =*new*TTFFontLoader(fontFileURI, fontResolver);
>      myCustomFont = myTTFLoader.getFont();
>


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message