Closed ronaldtse closed 8 months ago
Very strange issue. No italic in In XSL-FO:
<fo:table-cell display-align="before" padding-left="1mm" padding-right="1mm" padding-top="0.5mm" border="0.5pt solid black" text-align="left">
<fo:block role="SKIP">
<fo:inline font-family="FreeSans">™</fo:inline>
</fo:block>
</fo:table-cell>
Glyph in PDF renders as italic (blue T icon):
The issue in FOP font config generation. The FreeSans italic font file name is FreeSansOblique.ttf
(vs. FreeSerifItalic.ttf
). mn2pdf
doesn't recognize the font as 'italic' by word Oblique
in the file name, only Italic
:
<font embed-url="file:/C:/Users/IntlUser/.fontist/fonts/FreeSerifBoldItalic.ttf" kerning="yes" mn_default="false">
<font-triplet name="FreeSerif" style="italic" weight="bold"/>
</font>
<font embed-url="file:/C:/Users/IntlUser/.fontist/fonts/FreeSerifItalic.ttf" kerning="yes" mn_default="false">
<font-triplet name="FreeSerif" style="italic" weight="normal"/>
</font>
...
<font embed-url="file:/C:/Users/IntlUser/.fontist/fonts/FreeSansBoldOblique.ttf" kerning="yes" mn_default="false">
<font-triplet name="FreeSans" style="normal" weight="bold"/>
</font>
<font embed-url="file:/C:/Users/IntlUser/.fontist/fonts/FreeSansOblique.ttf" kerning="yes" mn_default="false">
<font-triplet name="FreeSans" style="normal" weight="normal"/>
</font>
Apache FOP sees the last entry <font-triplet name="FreeSans" style="normal" weight="normal"/>
and uses the font FreeSansOblique.ttf
for the normal text rendering.
Fixed:
Thank you @Intelligent2013 !
From: