[cairo] Fonts and characters in pdf/image surfaces
timothee.lecomte at ens.fr
Fri Feb 23 02:02:55 PST 2007
I have been enjoying the possibility to generate pdf files from my
cairo-based application (gnuplot with cairo terminal) with the same code
as the one used for generic image surfaces. It's great to save so much
So far, non-text elements are rendered almost exactly the same in the pdf
as in the image surface, but I do encounter an issue with text. I am using
pango to select the font options and output to the cairo surface.
For an image surface (and for an xlib surface too, I guess), 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
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
Is there a way to have this behaviour uniform on all surfaces ?
Thank you for your help.
P.S.: The versions that I am using are:
looking at the pdf with evince 0.6.1 / poppler 0.5.4
More information about the cairo