xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Szeak (Register Man)" <szea...@gmail.com>
Subject Re: struggling with "bulk font configuration"
Date Wed, 13 Sep 2017 09:53:38 GMT
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi,<br>
      <br>
      First of all, you may need to read:<br>
      - "Missing Glyphs" section in
      <a class="moz-txt-link-freetext" href="https://xmlgraphics.apache.org/fop/2.1/fonts.html">https://xmlgraphics.apache.org/fop/2.1/fonts.html</a><br>
      - font-base configuration element in
      <a class="moz-txt-link-freetext" href="https://xmlgraphics.apache.org/fop/2.1/configuration.html">https://xmlgraphics.apache.org/fop/2.1/configuration.html</a><br>
      -
      <a class="moz-txt-link-freetext" href="https://xmlgraphics.apache.org/fop/2.1/fonts.html#font_substitution">https://xmlgraphics.apache.org/fop/2.1/fonts.html#font_substitution</a><br>
      - <a class="moz-txt-link-freetext" href="https://xmlgraphics.apache.org/fop/2.1/fonts.html#selection">https://xmlgraphics.apache.org/fop/2.1/fonts.html#selection</a><br>
      <br>
      I'm not sure, it can FOP configuring for auto font switching by
      characters (glyphs), because of as a Missing Glyphs section also
      wrote:<br>
      "<span style="color: rgb(51, 51, 51); font-family: Tahoma,
        Verdana, Geneva, sans-serif; font-size: 14.6667px; font-style:
        normal; font-variant-ligatures: normal; font-variant-caps:
        normal; font-weight: normal; letter-spacing: normal;
        line-height: normal; orphans: 2; text-align: start; text-indent:
        0px; text-transform: none; white-space: normal; widows: 2;
        word-spacing: 0px; -webkit-text-stroke-width: 0px; display:
        inline !important; float: none; background-color: rgb(255, 255,
        255);">A better way is to use a font that has all the necessary
        glyphs. This glyph substitution is only a last resort.</span>"<br>
      AND:<br>
      "<span style="color: rgb(51, 51, 51); font-family: Tahoma,
        Verdana, Geneva, sans-serif; font-size: 14.6667px; font-style:
        normal; font-variant-ligatures: normal; font-variant-caps:
        normal; font-weight: normal; letter-spacing: normal;
        line-height: normal; orphans: 2; text-align: start; text-indent:
        0px; text-transform: none; white-space: normal; widows: 2;
        word-spacing: 0px; -webkit-text-stroke-width: 0px; display:
        inline !important; float: none; background-color: rgb(255, 255,
        255);">There are two font selection strategies:
        character-by-character or auto. The default is auto.<br>
        ...<br>
      </span><span style="color: rgb(51, 51, 51); font-family: Tahoma,
        Verdana, Geneva, sans-serif; font-size: 14.6667px; font-style:
        normal; font-variant-ligatures: normal; font-variant-caps:
        normal; font-weight: normal; letter-spacing: normal;
        line-height: normal; orphans: 2; text-align: start; text-indent:
        0px; text-transform: none; white-space: normal; widows: 2;
        word-spacing: 0px; -webkit-text-stroke-width: 0px; display:
        inline !important; float: none; background-color: rgb(255, 255,
        255);">Character-by-Character is NOT yet supported!</span>"<br>
      <br>
      Best regards, Szeak<br>
      <br>
      2017-09-12 16:44 keltezéssel, Ron Van den Branden írta:<br>
    </div>
    <blockquote type="cite"
      cite="mid:4d3e3b52-f51b-c4d0-4e92-1af92ef4fd60@kantl.be">Hi,
      <br>
      <br>
      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.
      <br>
      <br>
      Hence, I'm trying to find a more flexible solution, and I'm trying
      out the "bulk font configuration", documented at
      <a class="moz-txt-link-freetext" href="https://xmlgraphics.apache.org/fop/2.2/fonts.html#bulk">https://xmlgraphics.apache.org/fop/2.2/fonts.html#bulk</a>.
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?
      <br>
      <br>
      So far, I haven't been able to figure out how those
      "bulk-registered" fonts should be referred to in an XSL-FO file.
      <br>
      <br>
      Suppose I have a "noto" subfolder next to the FOP configuration
      file, with Google's Noto fonts, such as e.g.
      NotoSansCJKjp-Black.otf.
      <br>
      <br>
      In the FOP config file, I have following entry:
      <br>
      <br>
        &lt;renderers&gt;
      <br>
          &lt;renderer mime="application/pdf"&gt;
      <br>
            &lt;!-- doesn't work with relative paths? --&gt;
      <br>
            &lt;directory
      recursive="true"&gt;F:\fop\noto&lt;/directory&gt;
      <br>
            &lt;/fonts&gt;
      <br>
          &lt;/renderer&gt;
      <br>
        &lt;/renderers&gt;
      <br>
      <br>
      (Btw, the &lt;directory&gt; setting apparently doesn't work with a
      relative path?)
      <br>
      <br>
      Basically, I'm not sure how I can now use the
      NotoSansCJKjp-Black.otf font:
      <br>
          -can I just specify "font-family='NotoSansCJKjp-Black'" in the
      XSL-FO file?
      <br>
          -or should all fonts still be registered separately in the
      config file with a &lt;font&gt; definition? (In which case, what's
      the point of "bulk registration"?)
      <br>
      <br>
      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.
      <br>
      <br>
      Could anyone help me out here?
      <br>
      <br>
      Best,
      <br>
      <br>
      Ron
      <br>
      <br>
      <br>
---------------------------------------------------------------------
      <br>
      To unsubscribe, e-mail:
      <a class="moz-txt-link-abbreviated" href="mailto:fop-users-unsubscribe@xmlgraphics.apache.org">fop-users-unsubscribe@xmlgraphics.apache.org</a>
      <br>
      For additional commands, e-mail:
      <a class="moz-txt-link-abbreviated" href="mailto:fop-users-help@xmlgraphics.apache.org">fop-users-help@xmlgraphics.apache.org</a>
      <br>
      <br>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>

---------------------------------------------------------------------
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