relative paths for bulk font configuration?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

relative paths for bulk font configuration?

ron.vandenbranden
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: [hidden email]
For additional commands, e-mail: [hidden email]