Alexey Neyman created FOP-2180:
----------------------------------

             Summary: [PATCH] TTFReader: Output bounding box information for 
glyphs
                 Key: FOP-2180
                 URL: https://issues.apache.org/jira/browse/FOP-2180
             Project: Fop
          Issue Type: Wish
          Components: fonts
    Affects Versions: 1.1
            Reporter: Alexey Neyman
            Priority: Minor


As I mentioned in another email, I am trying to constrain FOP to use only 
local fonts (i.e. ones described in fop.cfg). For SVGs, I have a workaround:
- Generate fonts in SVG format using ttf2svg utility from Batik;
- Use an XSL stylesheet to embed all the fonts used by an SVG image into the 
image itself;
- Use such "preprocessed" SVG image as the input to FOP.

This does not work well with JEuclid, though. When JEuclid generates SVG from 
MathML, it performs font rendering - that is, replaces characters by actual 
paths. And again, it uses system fonts, not the fonts available in FOP - even 
if running as FOP plugin.

To work around this issue for MathML, I am currently switching from JEuclid to 
pMML2SVG (http://pmml2svg.sourceforge.net). It generates SVGs with text 
characters, not paths. But in order to do so, it needs font metrics. 
Unfortunately, font metrics produced by stock FOP TTFReader are not sufficient 
- this stylesheet also needs bounding box for each glyph. To obtain these, 
pMML2SVG currently packages an augmented TTFReader Java sources which are to 
be compiled and used in lieu of the stock one.

Given that the patch is very small and as far as I can tell, compatible with 
current users of font metrics (it just adds 4 attributes to glyph 
description), is it possible to integrate this support into stock FOP?

Patch from pMML2SVG, slightly modified to apply to FOP 1.1 sources, attached.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to