Hi Alexey,

On 04/01/2013 19:41, Alexey Neyman wrote:

<snip/>
Interesting workaround. We are trying to tackle this issue by providing
an alternative implementation of GVTFont in Batik that uses FOP's Font
Library to load the font metrics.
First, as I was told on the list previously, it is not a small feat and it
would take some time before this fix is released.

Yes, that is correct.


Then, even though it would solve the issue for SVGs, it won't help with font
selection for MathML. As I explained below, JEuclid pre-renders the glyphs
into paths.

That's true. I missed the fact you were working with JEuclid


And as far as I can tell, JEuclid project is all but dead: the last non-
trivial commit was 16 months ago, and the last release 30 months ago. I don't
think it is likely JEuclid will catch up with FOP improvements, even when
they're available.

I'm subscribed to the JEuclid mailing list and I get the same impression.


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.
Thanks for the patch. To get this added to the code base please raise an
issue in JIRA, add the diff as an attachment and include [PATCH] in the
subject line. A committer will then review the patch before applying it.
Created an issue:
https://issues.apache.org/jira/browse/FOP-2180

Thank you.


I know Peter Hancock is looking into doing something similar as he is
working on getting Batik to use FOP configured fonts instead of the
system ones. Peter mentioned to me offlist that he was going to need to
expose a few extra things in TTFReader to facilitate this, could be you
are covering similar ground here.
Maybe. Then again, the root of the issue is not Batik - that issue I work
around by embedding fonts. It is JEuclid's use of system fonts which is why I
am switching to pMML2SVG - which needs bounding box information for glyphs.

BTW, another useful feature in pMML2SVG that was not available in JEuclid is
that pMML2SVG outputs baseline position information in the generated SVG - so
that inline equations can be properly positioned on the line.

Sounds like we need a FOP plug-in for pMML2SVG to replace the ageing JEuclid one.

Thanks,

Chris


Regards,
Alexey.

Anyway, please raise the JIRA issue otherwise your patch could get lost.

Thanks,

Chris

Regards,

Alexey.



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





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

Reply via email to