relative paths for bulk font configuration?

Ron Van den Branden <[email protected]>
Newsgroups gmane.text.xml.fop.user
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.