[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#496070: [ghostscript] opentypefont



Am 08.02.2011 15:32, schrieb Fabian Greffrath:
I have seen many bug reports in which people complained about
improperly rendered web pages that had their prefered font set to
either Helvetica of Nimbus Sans, which means that the type1 system
fonts are selected for display. I am not sure, but I believe that the
kerning information for these fonts are not taken into account in
these cases. With truetype fonts (which have the information of both
the afm and the pfb file compiled in by fontforge) this problem should
be solved, while still preserving the original shape of the font.

This is indeed the truth!

1) I have only the regular gsfonts package installed, fontconfig uses the Nimbus Sans L Type1 variant (.pfb extension) as a replacement for Helvetica:

$ fc-match Helvetica
n019003l.pfb: "Nimbus Sans L" "Regular"

2) I render an example text using pango-view and requesting the Helvetica font. The resulting PNG is attached to this email:

$ pango-view --font "Helvetica" --text "Zwölf Boxkämpfer jagen Viktor quer über den großen Sylter Deich." -o n019003l_pfb.png

3) Now I convert the Type1 font into Truetype format and copy the resulting ttf file into my ~/.fonts directory. Fontforge immediately prefers this one over the Type1 variant (mind the .ttf extension), so there is no further action neecssary on the fontconfig side:

$ fc-match Helvetica
n019003l.ttf: "Nimbus Sans L" "Regular"

4) Now I render the exact same text again:

$ pango-view --font "Helvetica" --text "Zwölf Boxkämpfer jagen Viktor quer über den großen Sylter Deich." -o n019003l_ttf.png

Please note the difference in hinting: It is completely messed up with the pfb variant and has vastly improved with the ttf variant.

We should provide the transformed fonts ASAP!

 - Fabian

Attachment: n019003l_ttf.png
Description: PNG image

Attachment: n019003l_pfb.png
Description: PNG image


Reply to: