Re: Pango/Cairo with OpenType handling



Jeremy Smith wrote:
> 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.

There are in fact three variants of the PangoCairo FontMap.  The one used on
Linux is a subclass of PangoFcFontMap.  So, what you need to do is to check
whether your font is a PangoFcFont using PANGO_IS_FC_FONT(), and if it is, you
can call pango_fc_font_lock_face() on it.

Regards,

behdad


> 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
> 
> _______________________________________________
> gtk-i18n-list mailing list
> gtk-i18n-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-i18n-list
> 


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