Subject: Re: Why my font substitutions not worked ?



You have to put the "substitutions" element in a separate "fonts"
element directly under the "fop" element, not the renderer. So this
should look like this:

<fop version="1.0">
<fonts>
<substitutions>
<substitution>
<from font-family="SimSun" font-weight="700..900"/>
<to font-family="SimHei"/>
</substitution>
[more substitutions here]
</substitutions>
</fonts>
<renderers>
<renderer mime="application/pdf">
<font>
[your font declarations]


HTH

On 06.02.2009 10:50:34 Dongsheng Song wrote:
> When I use the following conf:
> <?xml version="1.0" encoding="UTF-8"?>
> <fop version="1.0">
> <renderers>
> <renderer mime="application/pdf">
> <fonts>
> <substitutions>
> <substitution>
> <from font-family="SimSun" font-style="italic"/>
> <to font-family="SimSun"/>
> </substitution>

This doesn't make any sense: substituting SimSun with SimSun.

> <substitution>
> <from font-family="SimSun" font-weight="700..900"/>
> <to font-family="SimHei"/>
> </substitution>
> <substitution>
> <from font-family="SimSun" font-style="italic"
> font-weight="bold"/>
> <to font-family="SimHei"/>
>
> </substitution>
> ...
>
> fop not use "SimHei,normal,400" substitute "SimSun,normal,700", why ?
> ...
> [WARN] FOUserAgent - Font "SimSun,normal,700" not found. Substituting
> with "SimSun,normal,400".
> ...
>
> Thanks for some help,
>
> ---
> Dongsheng Song
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx
> For additional commands, e-mail: fop-users-help@xxxxxxxxxxxxxxxxxxxxxx




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx
For additional commands, e-mail: fop-users-help@xxxxxxxxxxxxxxxxxxxxxx



Privacy