You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Joerg von Frantzius <jo...@artnology.com> on 2008/08/29 15:39:04 UTC
Type 1 font encoding problems?
Hi,
I can't get FOP to render ▶ correctly in PDF (see e.g.
http://en.wikipedia.org/wiki/Unicode_Geometric_Shapes).
It should show up in font "Courier". I checked the PDF generated, and
"Courier" is substituted with the Type 1 font "CourierStd" on my system,
telling from Acrobat Reader properties for the PDF file. I verified
using kfontview that indeed "CourierStd" has that glyph (in Unicode
block "Geometric Shapes").
The font's encoding is reported as Ansi, though, and I guess that's where
the problem is.
In some related bug (https://issues.apache.org/bugzilla/show_bug.cgi?id=6237)
it was recommended to "use a Unicode user font". Now I wonder how I can get
FOP to use or embed a Type 1 font with Unicode encoding?
Bug https://issues.apache.org/bugzilla/show_bug.cgi?id=17828 lets me think
that embedding a TrueType Font could solve the problem, as it seems
TTF is treated as Unicode.
Here is a simple self-contained example to show the glyph in question:
<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="only">
<fo:region-body region-name="xsl-region-body"
margin="0.7in" />
<fo:region-before region-name="xsl-region-before"
extent="0.7in" />
<fo:region-after region-name="xsl-region-after"
extent="0.7in" />
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="only">
<fo:flow flow-name="xsl-region-body">
<fo:block>This should be a black arrow right</fo:block>
<fo:block>
Courier:
<fo:inline font-family="Courier" font-style="normal"
font-weight="normal">▶
</fo:inline>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
Thanks for any hints,
J�rg
--
____________________________________________________________________
artnology GmbH - Milastra�e 4 - 10437 Berlin - Germany
Gesch�ftsf�hrer: Ekkehard Blome (CEO), Felix Kuschnick (CCO)
Registergericht: Amtsgericht Berlin Charlottenburg HRB 76376
UST-Id. DE 217652550
Fontforge says Type1 is restricted to ANSI Re: Type 1 font encoding
problems?
Posted by Joerg von Frantzius <jo...@artnology.com>.
I solved the problem by embedding a TrueType-Font that has the glyph
(DejaVuSans).
The Type1-font that I had wanted to use initially had been converted
with fontforge from OTF, and when I converted it again, fontforge told
me that Type1-fonts are restricted to ANSI. Converting the OTF font to
TTF instead, and embedding that using FOP seems to work well.
Joerg von Frantzius wrote:
> Hi,
>
> I can't get FOP to render ▶ correctly in PDF (see e.g.
> http://en.wikipedia.org/wiki/Unicode_Geometric_Shapes).
>
> It should show up in font "Courier". I checked the PDF generated, and
> "Courier" is substituted with the Type 1 font "CourierStd" on my system,
> telling from Acrobat Reader properties for the PDF file. I verified
> using kfontview that indeed "CourierStd" has that glyph (in Unicode
> block "Geometric Shapes").
>
> The font's encoding is reported as Ansi, though, and I guess that's where
> the problem is.
>
> In some related bug (https://issues.apache.org/bugzilla/show_bug.cgi?id=6237)
> it was recommended to "use a Unicode user font". Now I wonder how I can get
> FOP to use or embed a Type 1 font with Unicode encoding?
>
> Bug https://issues.apache.org/bugzilla/show_bug.cgi?id=17828 lets me think
> that embedding a TrueType Font could solve the problem, as it seems
> TTF is treated as Unicode.
>
> Here is a simple self-contained example to show the glyph in question:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
> <fo:layout-master-set>
> <fo:simple-page-master master-name="only">
> <fo:region-body region-name="xsl-region-body"
> margin="0.7in" />
> <fo:region-before region-name="xsl-region-before"
> extent="0.7in" />
> <fo:region-after region-name="xsl-region-after"
> extent="0.7in" />
> </fo:simple-page-master>
> </fo:layout-master-set>
> <fo:page-sequence master-reference="only">
>
> <fo:flow flow-name="xsl-region-body">
>
> <fo:block>This should be a black arrow right</fo:block>
> <fo:block>
> Courier:
> <fo:inline font-family="Courier" font-style="normal"
> font-weight="normal">▶
> </fo:inline>
> </fo:block>
>
> </fo:flow>
> </fo:page-sequence>
> </fo:root>
>
> Thanks for any hints,
> J�rg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
--
____________________________________________________________________
artnology GmbH - Milastra�e 4 - 10437 Berlin - Germany
Gesch�ftsf�hrer: Ekkehard Blome (CEO), Felix Kuschnick (CCO)
Registergericht: Amtsgericht Berlin Charlottenburg HRB 76376
UST-Id. DE 217652550