[cairo] Fonts and characters in pdf/image surfaces

Jeff Muizelaar jeff at infidigm.net
Fri Feb 23 06:03:30 PST 2007


On Fri, Feb 23, 2007 at 11:02:55AM +0100, Timothée Lecomte wrote:
> Dear all,
> 
> 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
> code !
> 
> 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
> 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.

It would probably help to post the pdf with the missing characters. Even
if just to check that the problem is with cairo and not poppler.

-Jeff


More information about the cairo mailing list