Re: Font error
On 05 Jun 2009, at 14:20, Nicolae Marasoiu wrote: Hi Nicolae I use a font, as attached (automatically templating-generated FO source, FOP config, ttf font, metrics xml). When generating PNG image things are stable. When outputing pdf, from local app, it is also stable. When outputing pdf from webapp, the following error occurs frequently, which can be overcame by overriding the ttf file and restarting the web app. What do you mean by 'overriding' the TTF file? Is the one in the webapp context different? BTW: Which FOP version are you using? If 0.95, then you should normally no longer need a separate metrics file, as FOP will generate it on-the-fly, as long as it has access to the font file and is configured to detect it. See: http://xmlgraphics.apache.org/fop/0.95/fonts.html#basics org.apache.commons.logging.impl.Jdk14Logger error Failed to embed font [metrics-url=ocrb.xml, embed-url=IDAutomationSOCRb.ttf, kerning=false] EC+IDAutomationSOCRb java.io.EOFException: Reached EOF, file size=41495 offset=132362 Can't say I've seen this one before... Do you get this error every time, or only on the second or subsequent runs? Regards Andreas - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Font error messages
On Jul 22, 2008, at 18:05, Jean-François El Fouly wrote: Hi Jean-François I searched the archives and did not find an entry for this problem. Please forgive me if I've been blind or stupid and should have found a previous thread on this topic. We have in the logs tons of error messages looking like: 2008-07-22 15:52:45,544 ERROR [org.apache.fop.fo.PropertyList] Ignoring property: font=Verdana (file:/var/data/static/ aeroconseil/back/TS/temp/test%20recette%20234587/pub/merged- doc.xml.fo:2607:87: Invalid property value: font=Verdana; property:'font') (It's nothing new, it has always been so since we use FOP, I mean for a few months and since 0.94). This is weird, since the font is not ignored, it is correctly handled and used by FOP, and embedded in the PDF. So these messages look just like noise and fill the log files with information that seems irrelevant. What did I missed, what should I fix or improve to get rid of these messages ? The font shorthand requires at least two components: font-size and font-family. So it should be either of the two following variants: font-family=Verdana font=10pt Verdana See: http://www.w3.org/TR/xsl/#font (style, weight, variant, line- height are optional; size and family are required) The reason that you don't see any effect in the output is most likely that the font-family is properly passed to the descendant nodes via inheritance (but I'd have to dive deeper into the related code and some examples to say for sure). Cheers Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Font error messages
Andreas Delmelle a écrit : The font shorthand requires at least two components: font-size and font-family. So it should be either of the two following variants: font-family=Verdana font=10pt Verdana See: http://www.w3.org/TR/xsl/#font (style, weight, variant, line-height are optional; size and family are required) The reason that you don't see any effect in the output is most likely that the font-family is properly passed to the descendant nodes via inheritance (but I'd have to dive deeper into the related code and some examples to say for sure). Ha ha... So my XML stanza: fo:block font-weight=normal font-size=8 font-family=Verdana font=Verdana is wrong, and the last attribute font=Verdana does nothing and probably causes the error message ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Font error messages
On Jul 22, 2008, at 19:14, Jean-François El Fouly wrote: Andreas Delmelle a écrit : The font shorthand requires at least two components: font-size and font-family. So it should be either of the two following variants: font-family=Verdana font=10pt Verdana See: http://www.w3.org/TR/xsl/#font (style, weight, variant, line- height are optional; size and family are required) The reason that you don't see any effect in the output is most likely that the font-family is properly passed to the descendant nodes via inheritance (but I'd have to dive deeper into the related code and some examples to say for sure). Ha ha... So my XML stanza: fo:block font-weight=normal font-size=8 font-family=Verdana font=Verdana is wrong, and the last attribute font=Verdana does nothing and probably causes the error message ? Not probably... most definitely. I guess you could even say: It does nothing, except generate an error message. ;-) But indeed, if you also specify it as value of 'font-family', that explains why the font still gets embedded. Cheers Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Font Error
FOP was most likely not able to load a font metrics file. I'm pretty sure you got an error message earlier in the process. Please check your log output. On 29.08.2005 19:18:06 Sajeesh N Kakkat wrote: Hi, I am getting the below error when I try to generate a PDF which has Chinese texts. Does anyone know what could be the reason ? java.lang.NullPointerException at org.apache.fop.render.pdf.fonts.LazyFont.mapChar(LazyFont.java:121) at org.apache.fop.layout.FontState.mapChar(FontState.java:212) at org.apache.fop.layout.FontState.getCharWidth(FontState.java:269) at org.apache.fop.layout.LineArea.addText(LineArea.java:567) at org.apache.fop.fo.FOText.addRealText(FOText.java:278) at org.apache.fop.fo.FOText.addText(FOText.java:252) snip/ Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]