Re: struggling with "bulk font configuration"

"Szeak (Register Man)" <[email protected]>
Newsgroups gmane.text.xml.fop.user
Message-ID <[email protected]>
Hi,

First of all, you may need to read:

- "Missing Glyphs" section in
https://xmlgraphics.apache.org/fop/2.1/fonts.html

- font-base configuration element in
https://xmlgraphics.apache.org/fop/2.1/configuration.html

-
https://xmlgraphics.apache.org/fop/2.1/fonts.html#font_substitution

- https://xmlgraphics.apache.org/fop/2.1/fonts.html#selection

I'm not sure, it can FOP configuring for auto font switching by
characters (glyphs), because of as a Missing Glyphs section also
wrote:

"A better way is to use a font that has all the necessary
glyphs. This glyph substitution is only a last resort."

AND:

"There are two font selection strategies:
character-by-character or auto. The default is auto.

...

Character-by-Character is NOT yet supported!"

Best regards, Szeak

2017-09-12 16:44 keltezéssel, Ron Van den Branden írta:

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:
[email protected]

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