Changes between Initial Version and Version 1 of WebKitGTKFonts


Ignore:
Timestamp:
Aug 26, 2010, 10:45:03 AM (14 years ago)
Author:
Martin Robinson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WebKitGTKFonts

    v1 v1  
     1= The Font Backends =
     2
     3WebKitGTK+ currently supports two font backends: FreeType and Pango. This is somewhat of a misnomer, because even though the FreeType backend uses Fontconfig for selection and Freetype for reading font data / creating custom fonts, it still uses Pango (specifically PangoCairo) for complex text layout (WebCore/platform/graphics/gtk/FontGtk.cpp). Currently there are quite a few issues related to font layout and selection.
     4
     5= Goals =
     61. '''Proper CSS font selection''' The CSS standard has a fairly rigorous [http://www.w3.org/TR/css3-fonts/#font-matching-algorithm|detailed algorithm] for selecting the appropriate font for text. Instead of properly falling back according to the list of fonts in CSS, WebKitGTK+ lets Fontconfig or Pango to supply what it thinks is an appropriate replacement.
     7
     82. '''Use HarfBuzz directly''' PangoCairo uses HarfBuzz internally, but switching away from PangoCairo has benefits. Behdad Esfahbod, author of HarfBuzz, also summarizes why it is best for [http://behdad.org/text/| browsers to use HarfBuzz directly]:
     9  Firefox uses Pango. Firefox 2 was hacked to use PangoLayout API. That was very abusive and inherently inefficient. Firefox 3 has got a new layout engine that is completely based on cairo. The Linux port subclasses PangoFcFontMap to be able to support both CSS text selection as well as web fonts. By doing that it is essentially reimplementing most of Pango and only using the shaping logic. It makes much more sense to use HarfBuzz directly, and Mozilla is now working on getting HarfBuzz ready for that.
     10Additionally, using HarfBuzz directly will allow us to share layout and shaping code with Chromium.