Pango/Cairo with OpenType handling



I'm trying to figure out how to use the OpenType font handling functions as described here:
<http://library.gnome.org/devel/pango/unstable/pango-OpenType-Font-Handling.html>

The problem is that in order to do anything with OpenType, I first need to get a PangoOTInfo. I can only get a PangoOTInfo if I have an FT_Face, which is specific to FreeType. I want to use Cairo as the backend. Is this possible? I can't seem to figure out any way of getting a valid FT_Face without using FreeType or Xft.

If anyone could just tell me the simplest way to get an FT_Face, that would be perfect. I've tried using pango_font_map_load_font() to get a PangoFont, then passing that to pango_ft2_font_get_face() (which is deprecated), but I get a warning about how the font is not valid:

Pango-WARNING **: pango_ft2_font_get_face called with bad font, expect ugly output

So clearly I'm doing something wrong.

Thanks for any advice (I'm brand new to using Pango, as you can probably tell)
Jeremy



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