I thought someone might ask that :-)
For simplicity in my earlier post, I left out
<substitution>
<from font-family="Arial" font-weight="700..900"/>
<to font-family="Arial Black"/>
</substitution>
I don't include an embed-url for that, and the message for that one
*does* get repeated.
Also, when I omit:
<substitution>
<from font-family="Calibri" font-style="normal" font-weight="400"/>
<to font-family="Times New Roman" font-weight="400"
font-style="normal"/>
</substitution>
Acrobat reports that the resulting PDF *does* contain Calibri font.
(The Calibri font is not in the resulting PDF if the substitution is
present.)
On Wed, Jul 16, 2014 at 6:41 PM, Luis Bernardo <[email protected]> wrote:
> Are you sure the fonts are found the second time, or you just say that
> because the message is not repeated? Font setup may be just happening once
> and then reused.
>
>
> On Wed, Jul 16, 2014 at 4:12 AM, Jason Harrop <[email protected]> wrote:
>>
>> Hi all, I'm seeing something which seems a little strange to me..
>>
>> With the fop config below, the first time it is set (via
>> fop.apps.FopConfParser, using March 19 2014 code) , it seems unable to
>> use the destination fonts:-
>>
>> ERROR org.apache.fop.fonts.substitute.FontSubstitutions
>> .adjustFontInfo line 53 - Unable to match font substitution for
>> destination qualifier font-family=[Calibri], font-style=[italic],
>> font-weight=[bold]
>>
>> ERROR org.apache.fop.fonts.substitute.FontSubstitutions
>> .adjustFontInfo line 53 - Unable to match font substitution for
>> destination qualifier font-family=[Times New Roman],
>> font-style=[normal], font-weight=[400]
>>
>> However, if I use the config again in the same thread, well, the
>> second time, the fonts are found and those error messages aren't
>> emitted.
>>
>> I observe the same behaviour using FOP 1.1 (FopFactory).
>>
>> thoughts? thanks .. Jason
>>
>>
>> <fop version="1.0">
>>
>> <strict-configuration>true</strict-configuration>
>>
>> <fonts>
>>
>> <substitutions>
>>
>> <substitution>
>>
>> <from font-family="ZapfDingbats" font-style="normal"
>> font-weight="700"/>
>>
>> <to font-family="Calibri" font-weight="bold" font-style="italic"/>
>>
>> </substitution>
>>
>> <substitution>
>>
>> <from font-family="Calibri" font-style="normal"
>> font-weight="400"/>
>>
>> <to font-family="Times New Roman" font-weight="400"
>> font-style="normal"/>
>>
>> </substitution>
>>
>> </substitutions>
>>
>> </fonts>
>>
>> <renderers>
>>
>> <renderer mime="application/pdf">
>>
>> <fonts>
>>
>> <font embed-url="file:/C:/Windows/FONTS/times.ttf">
>>
>> <font-triplet name="Times New Roman" style="normal"
>> weight="normal"/>
>>
>> </font>
>>
>> <font embed-url="file:/C:/Windows/FONTS/timesbd.ttf">
>>
>> <font-triplet name="Times New Roman" style="normal"
>> weight="bold"/>
>>
>> </font>
>>
>> <font embed-url="file:/C:/Windows/FONTS/timesbi.ttf">
>>
>> <font-triplet name="Times New Roman" style="italic"
>> weight="bold"/>
>>
>> </font>
>>
>> <font embed-url="file:/C:/Windows/FONTS/timesi.ttf">
>>
>> <font-triplet name="Times New Roman" style="italic"
>> weight="normal"/>
>>
>> </font>
>>
>> <font embed-url="file:/C:/Windows/FONTS/calibri.ttf">
>>
>> <font-triplet name="Calibri" style="normal" weight="normal"/>
>>
>> </font>
>>
>> <font embed-url="file:/C:/Windows/FONTS/calibrib.ttf">
>>
>> <font-triplet name="Calibri" style="normal" weight="bold"/>
>>
>> </font>
>>
>> <font embed-url="file:/C:/Windows/FONTS/calibriz.ttf">
>>
>> <font-triplet name="Calibri" style="italic" weight="bold"/>
>>
>> </font>
>>
>> <font embed-url="file:/C:/Windows/FONTS/calibrii.ttf">
>>
>> <font-triplet name="Calibri" style="italic" weight="normal"/>
>>
>> </font>
>>
>> </fonts>
>>
>> </renderer>
>>
>> </renderers>
>>
>> </fop>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]