Comment 15 for bug 560795

Revision history for this message
In , "freedom" Koan-Sin Tan (koansin-tan) wrote :

(In reply to comment #12)
> (From update of attachment 77796 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=77796&action=review
>
> > WebCore/platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp:67
> > + PangoFontDescription* pangoDescription = pango_font_description_from_string(face->family_name);
> > + if (!pangoDescription)
> > + return false;
> > +
>
> I'm pretty sure this won't work with custom fonts, since IIUC Pango just does a Fontconfig lookup. It makes more sense to bail out for fonts with no FcPattern.

As we discussed on IRC, I tried [1] on Ubuntu. It worked like what on my Mac.
I read a little bit Pango source code. It seems to me that there is no way to create PangoFont or PangoFcFont from FT_Face without adding new API to Pango.
And the reason why my code works is that Pango can use FreeType without using FontConfig. The PangoFcFont is kinda misnomer, I think. PangoFcFont is can be Xft font, FreeType Font, or FontConfig+FreeType font

[1] http://freebsd.csie.nctu.edu.tw/~freedom/webkitgtk-test/serb.html