xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Hennebert <vhenneb...@gmail.com>
Subject Re: FOP and Chinese TTF fonts
Date Thu, 10 Dec 2009 11:37:31 GMT
Hi Andy,

andyrobb wrote:
> I'm trying to setup chinese simhei ttf font on our FOP server - version .95.
> I have the font installed in windows fonts folder, and I have font
> autodetect enabled in the fop.xconf folder. 
> I can see fop can detect arial ttf font in the same folder, but it doesn't
> detect the simhei font.

Maybe it does, but under a different name to what you expect. IIC FOP
reads the name stored in the font file; that usually has nothing to do
with the name of the file itself, and sometimes neither with the common
name used to refer to the font (e.g., ‘MS Arial’ while everyone would
say Arial). Try and open the font with a font editing program and figure
out what its name is.

> The only way I have been able to get this working is
> to generate a metric file for the simhei font and add this to the fop config
> file.
> I have read extensively the fop docs, faq, and forums on this issue, and
> there seems to be a lot of conflicting information, hence my post. What I'd
> simply like to know is:
> Will FOP 0.95 auto detect a chinese TTF font when it's installed in windows
> (and linux)? If so, any ideas why this fails on my setup when other fonts
> are auto-detected?

In my experience font auto-detection is not 100% reliable.

> Does FOP 0.95 require a metrics file for a chinese TTF file? If not (as the
> docs suggest), can anyone provide some sample config file entries, for a
> simhei.ttf file installed in the windows fonts folder, that works? I have
> been unable to get this to work any other way.

The fallback usually is to manually configure the font, and you usually
don’t need to generate the XML font metrics. For example:
    <font embed-url="path/to/my/font.ttf">
      <font-triplet name="ChineseFont" style="normal" weight="normal"/>
That way you can choose whatever font family name you fancy to refer to
that font.

> Thanks
> Andy


To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

View raw message