On 15.12.2015 05:33, Glenn Adams wrote:
You need to use a font that has a glyph for each character. None of the "base
14" fonts do so.

Also, FYI, please provide example input in terms of FO content, not XSL input.

On Mon, Dec 14, 2015 at 9:14 PM, FOPUser <[email protected]
<mailto:[email protected]>> wrote:

    We are currently using FOP 1.0 for PDF generation. One of the requirements
    for our application is to support  special characters. The special
    characters are part of the content that the application receives from a
    third party. So, we don’t know where special characters occurs in the
    content. The requirement is the render the  special characters in the PDF .
    While, testing the special characters we found all, the special characters
    from the Symbol fonts are rendered as ‘#’ in the PDF.   From the logs it is
    clear  non availability of the glyps are the reason for special characters
    rendered as #.  The symbol fonts are part of the  14 base fonts and doesn’t
    need any additional configuration. Appreciate any help that will help us
    move forward on this.
            I am using the example from the
    https://xmlgraphics.apache.org/fop/quickstartguide.html and below are
    examples and output from PDF generation.

[...]

Haven't used it in a while, but the "font-family" attribute allows multiple fonts to be specified, with the later ones as a fallback if the characters are not available in the former. So maybe you are lucky with specifying "Helvetica, Symbol"... When I used it years ago there was a small catch, namely that FOP stayed in the fallback font as long as it also contained the subsequent characters (which was not exactly what I wanted). So if, for example, your symbol was followed by digits, which are also present in the symbol font, they would have be rendered with this font (looking different to Helvetica's digits). I don't know whether this has been solved in the meantime.

Otherwise, -- as a hack -- I would search and wrap the special characters in the XSL/T style sheet. With XSL/T 2, this is quite simple by adding a rule for text() nodes and using the <xsl:analyze-string> mechanism. I once used it to flip Arabic text when FOP didn't supported RTL text well enough.

Klaus


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to