Hi there,

at the moment, Batik hard-codes the use of AWT fonts loaded from the
system. This is done in the FontFamilyResolver class, and those AWT
fonts are made available through the lookup static method.

Although Batik provides a font hierarchy (GVTFont, GVTFontFamily, etc.)
that mimics the AWT one but is independent from that latter, it is not
possible to leverage it by creating custom implementations. For example,
it is not possible for FOP to hook its own implementation based on its
font library, so that fonts configured through FOP could be used for SVG
images.

ATM FOP has to resort to some mechanism that tries and match AWT fonts
loaded by Batik to FOP-configured fonts. This requires two actions from
the user: install the font on the system /and/ configure it in FOP. The
user must also be careful to put the right font-family in the FOP
configuration file, so that it matches the one that will be used by AWT,
and the font can be retrieved by FOP at rendering time.

This is sub-optimal and becomes a problem when FOP is run in a cloud
environment, where it’s not always possible to install fonts on the
underlying system that runs the JVM, and where we want to restrict
access by users to only their resources.

Along with Peter Hancock, I’ve started to experiment with implementing
a FOP-specific version of the GVT font sub-system. The goal is to avoid
using AWT fonts altogether and rely solely on FOP-configured fonts to
render SVG.

We already have some results and would like to put them in a branch of
Batik for review by the community. We could submit patches and have them
applied to the branch by a Batik committer, but it would be easier if we
could commit to that branch directly. Given that Batik is a sub-project
of XML Graphics and that we already are committers of FOP and XGC, this
should be a reasonable request? So, would it be possible to create
a branch from trunk and give Peter and me write access to it?

Let me know what you think.

Thanks,
Vincent

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

Reply via email to