On Jul 19, 2008, at 3:03 PM, Joshua Chia wrote:

I have a design-related question about using Pango in Webkit, especially in the GTK port, because I'm trying to use Pango in my port by borrowing ideas from the GTK port.

Pango itself already does font matching and I believe can fallback properly to the right font that has the glyph for the required character.

The WebCore GlyphPageTreeNode code in concert with the various Font.* classes seem to be designed for font and glyph selection. I'm not sure how it's supposed to work, bit it seems to be not working on GTK. For example, on www.baidu.com, some Chinese characters render as squares.

I'm wondering whether it'll be ok to skip the WebCore font handling code and let Pango worry about font handling and glyph selection. Perhaps the code will be simpler if I don't have to implement the platform specific Font.* code that is supposed to interface with the WebCore font and glyph infrastructure, but I have no idea about the performance. Any thoughts?

The glyph cache mechanism does work on the Mac and Win ports. I think it would probably be a better idea to make it work with Gtk/Pango than to skip it. For "simple" text (runs of characters from unicode ranges that are not affected by contextual forms) it runs way faster than any native font system we have seen. And without supporting this layer, you'll have to be careful to make sure CSS font fallback is performed correctly. Our machinery handles this, but many native text systems want to do their own font selection, which likely would not match the CSS algorithm.

 - Maciej

_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to