title: Apache FOP: failed to load and use custom font
body: <p>I want to use a custom font (Vito-Regular.otf) for the pdf documents generated inside a java programm - using Apache FOP 2.1.</p>
  
  <p>Most of the samples found on the web refer to FOP 1.0 and .ttf fonts. So this will help me at all.</p>
  
  <p>My FOP user config:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?xml version="1.0"?&gt;
  &lt;fop version="1.0"&gt;
    &lt;renderers&gt;
      &lt;renderer mime="application/pdf"&gt;
        &lt;fonts&gt;
          &lt;font embed-url="file:C://Windows//Fonts//Vito-Regular.otf" kerning="yes" &gt;
            &lt;font-triplet name="Vito" style="normal" weight="normal" /&gt;
          &lt;/font&gt;
        &lt;/fonts&gt;
      &lt;/renderer&gt;
    &lt;/renderers&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Using in the template:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>    &lt;fo:block-container font-size="9pt" font-family="Vito"&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Will lead to use the default font (any) but not the (for me expected) Vito font:</p>
  
  <pre><code>WARNUNG: Font "Vito,normal,400" not found. Substituting with "any,normal,400".
  </code></pre>
  
  <p>So here are my main questions on this issue:</p>
  
  <ol>
  <li>Is there a way to check/read the loaded fonts in Apache FOP 2.1?</li>
  <li>Is the combination of 'Vito,normal,400' equivalent to name,style,weight?</li>
  <li>Is the configuration of the font correct set? Even not what have I overseen?</li>
  <li>Is the font correct referenced in the template?</li>
  <li>Is there a way to check if the font is compatible with Apache FOP?</li>
  </ol>
  
  <p>Any help on these questions is appreciated.</p>