xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Van den Branden <ron.vandenbran...@kantl.be>
Subject struggling with "bulk font configuration"
Date Tue, 12 Sep 2017 14:44:17 GMT
Hi,

I'm using FOP 2.1 for a journal whose submissions may occasionally 
contain all kinds of exotic characters, such as Japanese, Ethiopian, 
etc. I've been able to fix missing glyphs by defining specific fonts in 
the FOP configuration file and referring to them by means of a list of 
"font-family" values. Yet, it's hard to know exactly what font will 
cover all glyphs for every language, and adding new fonts requires both 
expanding the FOP configuration file and the "font-family" list in the 
XSL-FO files.

Hence, I'm trying to find a more flexible solution, and I'm trying out 
the "bulk font configuration", documented at 
https://xmlgraphics.apache.org/fop/2.2/fonts.html#bulk. I don't know if 
I'm misinterpreting this "bulk font configuration" as a means to 
register a lot of fonts without having to define them separately, so 
they can be used as a pool of fallback fonts for glyphs that aren't 
supported by the standard font?

So far, I haven't been able to figure out how those "bulk-registered" 
fonts should be referred to in an XSL-FO file.

Suppose I have a "noto" subfolder next to the FOP configuration file, 
with Google's Noto fonts, such as e.g. NotoSansCJKjp-Black.otf.

In the FOP config file, I have following entry:

   <renderers>
     <renderer mime="application/pdf">
       <!-- doesn't work with relative paths? -->
       <directory recursive="true">F:\fop\noto</directory>
       </fonts>
     </renderer>
   </renderers>

(Btw, the <directory> setting apparently doesn't work with a relative path?)

Basically, I'm not sure how I can now use the NotoSansCJKjp-Black.otf font:
     -can I just specify "font-family='NotoSansCJKjp-Black'" in the 
XSL-FO file?
     -or should all fonts still be registered separately in the config 
file with a <font> definition? (In which case, what's the point of "bulk 
registration"?)

So far, I've noticed that just bulk-registrering the "noto" subfolder, 
and specifying "font-family='Arial'" (or even variants of 
"font-family='Arial,NotoSansCJKjp-Black'") doesn't make FOP fall back to 
the NotoSansCJKjp-Black.ttf font for Japanese characters that aren't 
available in Arial.

Could anyone help me out here?

Best,

Ron


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


Mime
View raw message