For an image surface, pango has some sort of fallback mechanism if the select font does not contain the character I want to draw. For example, I want to display a Japanese character, and I select the "Bitstream Vera Sans" font which does not contain it, and I get a bitmapped character obviously coming from another font. My problem is that this fallback mechanism does not seem to exist for pdf surfaces. Instead of a bitmapped Japanese character, there is no displayed character. This looks like a bug. It has been reported to the cairo mailing-list, I am filling a bug report so that it doesn't get lost. Here are pdf and image outputs of my sample application: http://tipote.free.fr/cairopdf_utf8.pdf http://tipote.free.fr/wxt_utf8.png Adrian Johnson looked at the pdf output and replied: "The bitmap font is embedded in your the PDF. The reason you can't see it is that the bitmap glyphs have a y coordinate of -78338. I have reproduced this problem using the mixed.pango from http://lists.freedesktop.org/archives/cairo/2007-February/009476.html when I don't have any Chinese TrueType fonts installed. I have confirmed that Pango is passing in the invalid y coordinate to cairo_show_glyphs() when using the PDF or PS surface." It may look like a pango bug, but I'm posting this as a cairo bug since it appears with a pdf surface but not for an image surface. Thanks for your help. Best regards, Timothée Lecomte P.S.: The versions that I am using are: cairo 1.3.12 pango 1.4.10 fontconfig 2.4.2 freetype 2.3.1 looking at the pdf with evince 0.6.1 / poppler 0.5.4
commit 3d2144b6af07ca44b6fbf1c96080b7e2b7c0285c Author: Behdad Esfahbod <behdad@behdad.org> Date: Fri Jan 25 17:06:11 2008 -0500 [cairo-ft] Fix font metrics computation for bitmap fonts and no metrics-hinting Preivously we were returning NAN font metrics. Fixed now. Makes bitmap-font test pass again.
Will be in 1.6, and in 1.4.16 if there's going to be one.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.