You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Ron Van den Branden <ro...@kantl.be> on 2017/10/02 09:40:48 UTC
relative paths for bulk font configuration?
Hi,
I have a simple question: when bulk-configuring fonts with the
<directory> element inside a FOP configuration file, this only seems to
work with absolute paths. Yet, when embedding fonts individually with
the <font> element, the value for the @embed-url attribute is
interpreted relative to the <font-base> setting.
For example:
<renderers>
<renderer mime="application/pdf">
<fonts>
<!-- register all the fonts found in a directory -->
<directory>C:\MyFonts1</directory>
<font embed-url="myFonts1/Arial.ttf">
<font-triplet name="Arial" style="normal" weight="normal"/>
</font>
</font>
</renderer>
</renderers>
This works, as long as the path inside <directory> is an absolute path;
directories specified as relative paths aren't found. Yet, the relative
path "myFonts1/Arial.ttf" in the @embed-url attribute is resolved
without problems.
Of course it would be great if <directory> could also handle relative
paths. Is the current situation an oversight or a conscious decision? In
the latter case, I think it would make sense to make this more explicit
in the documentation at https://xmlgraphics.apache.org/fop/2.2/fonts.html.
Best,
Ron
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org