[cairo] Two problems with Type 1 fonts

suzuki toshiya mpsuzuki at hiroshima-u.ac.jp
Sat Dec 1 00:48:26 PST 2007


Hi,

Although yet I've not tried to reproduce the problems
you reported (on any platforms), I want to know which
Type1 font I should use to reproduce the problem.
I wish if the problem can be reproduced by freely
distributed Type1 font.

The problems you reported made me reminded an issue in
ghostscript that CFF OpenType made ghostscript confused:
http://bugs.ghostscript.com/show_bug.cgi?id=689538
I'm interested in.

Regards,
mpsuzuki

Elmar Braun wrote (2007/12/01 8:00):
> Hi,
> 
> I have two (possibly related) problems with Type 1 fonts. I'm using 
> Cairo 1.4.12 on Windows.
> 
> The first problem is that text output to any surface other than a Win32 
> surface is completely garbled. For example, when I use a Type 1 font to 
> write the string "Type" to a PDF-, SVG- or image surface, the surface 
> will show the string "5ZQF".
> 
> The second issue is that cairo_scaled_font_glyph_extents() doesn't seem 
> to work correctly with Type 1 fonts. When I rely on the results of that 
> function to draw glyphs with cairo_show_glyphs(), the glyph positions 
> are skewed. I think this may be related to the first problem, because 
> the glyph positions seem to be correct for the garbled glyphs that are 
> emitted on non-screen surfaces.
> 
> The attached PNG demonstrates the problem. It shows how Cairo renders 
> four lines: The first uses a Type 1 font and cairo_show_text. The second 
> uses cairo_scaled_font_glyph_extents and cairo_show_glyphs, also with a 
> Type 1 font. The third and fourth lines show the output of using the 
> same code as for the first and second, but with a TrueType font.
> 
> I've also attached the PDF output of the same four lines. It shows that 
> the first two lines are completely garbled, though the second one has 
> correct glyph positions (for the wrong glyphs).
> 
> Elmar
> 
> 
> ------------------------------------------------------------------------
> 
> This body part will be downloaded on demand.



More information about the cairo mailing list