You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Michal Jastak <wa...@ais.pl> on 2003/08/01 09:12:04 UTC

Re: FOP 0.20.5 - problems with embedded fonts

J. Pietschmann wrote:

> > I have problems with user defined fonts in FOP 0.20.5 embedded into Servlet.
> 
> Does it work from the command line or with file: URLs? Maybe the
> font is corrupted by accessing it through a web server.

I've tested the same code under resin, instead of jboss + tomcat, using fonts
accessed via HTTP protocol, everything works perfectly, maybe I should 
send my question to jboss or tomcat mailing list ;) 

I've tested Content-Type set by resin and jboss + tomcat, both sets: text/plain
for truetype font and for XML font metrics, 

I've also tested using application under jboss + tomcat with fonts served
by resin, doesn't work too, 

I think the problem may be related only to jboss + tomcat + fop situation, 
any suggestions what may cause it ?

best regards

-- 
Michał "Yahoo" Jaśtak,
  warlock@ais.pl, warlock@ncac.torun.pl, warlock@bofh.torun.pl
  http://www.ncac.torun.pl/~warlock

       "Try not. Do. Or do not. There is no try." (Yoda)

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


Re: FOP 0.20.5 - problems with embedded fonts

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Michal Jastak wrote:
> I've tested Content-Type set by resin and jboss + tomcat, both sets: text/plain
> for truetype font and for XML font metrics, 

Hmm, standard fallback behaviour. The problem with text/plain is
that some software in the processing chain (server or client) may
be tempted to fiddle with line endings, which is bad for TTF which
are binaries.

> I've also tested using application under jboss + tomcat with fonts served
> by resin, doesn't work too, 
> 
> I think the problem may be related only to jboss + tomcat + fop situation, 
> any suggestions what may cause it ?

Complex software systems have...interesting problems.
I'd first try to download a TTF via HTTP using wget and compare to
the original file in order to check whether the server mangles it
by default. Also try do define application/octet-stream for TTF
in the server configuration and see whether this helps. Then hack
into the FOP font loader and tee the font to a file for comparision
with the original. Finally, did you try to generate a PDF with
jboss+tomcat without font embedding? Something might corrupt
the PDF independently of that. I never had problems with Tomcat
and all kinds of FOP servlets, I never used JBoss though.

J.Pietschmann



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