Question regarding (OpenType) font support

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Question regarding (OpenType) font support

Martin Sievers-2
Dear list members,

I've been looking at the FOP font mechanism for some days now, but still
don't have a clue what's going wrong. I want to create PDF documents and
use custom fonts, especially OpenType. Therefore I added a configuration
file according to the documentation.

<renderers>
   <renderer mime="application/pdf">
      <fonts>
         <!-- register all the fonts found in a directory -->
         <directory>/home/martin/.fonts</directory>

         <!-- register all the fonts found in a directory and all of its
sub directories (use with care) -->
         <directory recursive="true">/home/martin/.fonts</directory>

         <!-- automatically detect operating system installed fonts -->
         <auto-detect/>
      </fonts>
   </renderer>
</renderers>

Unfortunately FOP still does not find any font other than the ones from
Base 14. I then created some metrics for the TrueType fonts and added
corresponding lines to the configurations, but no change.

"org.apache.fop.tools.fontlist.FontListMain" does not show any custom
font at all.

From reading different statements on the web I couldn't get a solution
either. So, how can I use Opentype fonts with FOP 1.0? Is there any
(easy) way? Why does FOP not find my TrueType fonts installed?

Thank you for your responses.

Best regards
Martin Sievers


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

sievers.vcf (534 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Question regarding (OpenType) font support

Chris Bowditch
On 20/12/2010 16:19, Martin Sievers wrote:
> Dear list members,

Hi Martin,

> I've been looking at the FOP font mechanism for some days now, but still
> don't have a clue what's going wrong. I want to create PDF documents and
> use custom fonts, especially OpenType. Therefore I added a configuration
> file according to the documentation.

FOP has only limited support for Open Type fonts. Specifically it cannot
deal with OTF Fonts that contain CFF glyphs. In my experience, most OTF
Fonts contain CFF glyphs. I suggest you attempt to add the font manually
rather than trying to auto detect it or adding whole directories. When
the Font is added explicitly you should receive more feedbak about why
FOP can't deal with the Font, e.g.

<font kerning="yes" embed-url="file:///C:/Windows/Fonts/ArialUni.TTF">
<font-triplet name="Arial Unicode MS" style="normal" weight="normal"/>
<font-triplet name="Arial Unicode" style="normal" weight="normal"/>
</font>

> <renderers>
>     <renderer mime="application/pdf">
>        <fonts>
>           <!-- register all the fonts found in a directory -->
>           <directory>/home/martin/.fonts</directory>
>
>           <!-- register all the fonts found in a directory and all of its
> sub directories (use with care) -->
>           <directory recursive="true">/home/martin/.fonts</directory>
>
>           <!-- automatically detect operating system installed fonts -->
>           <auto-detect/>
>        </fonts>
>     </renderer>
> </renderers>
>
> Unfortunately FOP still does not find any font other than the ones from
> Base 14. I then created some metrics for the TrueType fonts and added
> corresponding lines to the configurations, but no change.

Metrics Files are not required by FOP v1.0. In fact using them prevents
some newer features of FOP's font support, so we recommend that you
don't generate the metrics files.
> "org.apache.fop.tools.fontlist.FontListMain" does not show any custom
> font at all.
>
> > From reading different statements on the web I couldn't get a solution
> either. So, how can I use Opentype fonts with FOP 1.0? Is there any
> (easy) way? Why does FOP not find my TrueType fonts installed?
>
> Thank you for your responses.

Thanks,

Chris

> Best regards
> Martin Sievers
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]