Loading ...
Sorry, an error occurred while loading the content.

5008Re: [XSL-FO] FOP font embed, configuration question

Expand Messages
  • Chris Bowditch
    Mar 2, 2004
    • 0 Attachment
      Mark Ivs wrote:


      > Everything works fine. My question is, about the hard
      > coded path to the "msgothic.ttc" file in the
      > embed-file attribute.
      > I was wondering if there is a generic way to tell fop
      > where to look for the .ttc file. Because users can
      > have their fonts directory anywhere. It can be C drive
      > or D drive or anything right.

      What you need is the font base dir. Documented here:


      So put relative paths in your font metrics definition, e.g. just
      "msgothic.ttc" and then FOP will resolve the path relative to the FOP
      base dir. The FOP base dir doesnt need to be hard coded in the
      userconfig.xml either, you can change it in the code, e.g.


      > Second question:
      > Let's say the font is not installed in a users
      > machine. FOP throws an error saying that it cannot
      > recognize the font. In this case, it looks like it
      > chooses a default font. Is it possible to do that in
      > the xsl or in the java code ? Meaning....look for
      > msgothic font, if you can't find it then use
      > helvettica.

      Well the XSL-FO spec says you can do font-family="msgothic, helvettica,
      sans-serif" and the formatter will behave as you describe, but IIRC,
      then this feature isnt implemented in FOP, but I could be wrong...

    • Show all 6 messages in this topic