Skip to content
  • commit-queue@webkit.org's avatar
    [Cairo] Add complex font drawing using HarfbuzzNG · 868e06e2
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=91864
    
    Patch by Dominik Röttsches <dominik.rottsches@intel.com> on 2012-07-27
    Reviewed by Simon Hausmann and Martin Robinson.
    
    .:
    
    Configuring Freetype backend to use HarfBuzz by default.
    
    * Source/cmake/FindHarfBuzz.cmake: Added pkgconfig based discovery of HarfBuzz.
    * Source/cmake/OptionsEfl.cmake: Adding Harfbuzz configuration.
    
    Source/WebCore:
    
    Adding Harfbuzz support to EFL by implementing it with the help of cairo and cairo-ft.
    Reusing Chromium's Harfbuzz-NG support.
    
    No new tests, complex font support is covered by existing tests.
    
    * CMakeLists.txt: Adding new cairo based implementations, removing emtpy FontEfl.cpp
    * WebCore.gypi: Removing FontEfl.cpp
    * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp: Added. New implementation that implements cairo & harfbuzz-ng based complex font drawing.
    (WebCore):
    (WebCore::Font::drawComplexText):
    (WebCore::Font::drawEmphasisMarksForComplexText):
    (WebCore::Font::canReturnFallbackFontsForComplexText):
    (WebCore::Font::canExpandAroundIdeographsInComplexText):
    (WebCore::Font::floatWidthForComplexText):
    (WebCore::Font::offsetForPositionForComplexText):
    (WebCore::Font::selectionRectForComplexText):
    * platform/graphics/efl/FontEfl.cpp: Removed.
    * platform/graphics/freetype/FontPlatformData.h: Adding a getter that retrieves a harfbuzz face.
    (FontPlatformData):
    * platform/graphics/freetype/FontPlatformDataFreeType.cpp: Adding a getter that retrieves a harfbuzz face.
    (WebCore::FontPlatformData::operator=):
    (WebCore::FontPlatformData::FontPlatformData):
    (WebCore):
    (WebCore::FontPlatformData::harfbuzzFace):
    * platform/graphics/harfbuzz/ng/HarfBuzzNGFaceCairo.cpp: Added. Cairo-freetype based approach to get complex font metrics.
    (WebCore):
    (CairoFtFaceLocker):
    (WebCore::CairoFtFaceLocker::CairoFtFaceLocker):
    (WebCore::CairoFtFaceLocker::lock):
    (WebCore::CairoFtFaceLocker::~CairoFtFaceLocker):
    (WebCore::floatToHarfBuzzPosition):
    (WebCore::doubleToHarfBuzzPosition):
    (WebCore::CairoGetGlyphWidthAndExtents):
    (WebCore::harfbuzzGetGlyph):
    (WebCore::harfbuzzGetGlyphHorizontalAdvance):
    (WebCore::harfbuzzGetGlyphHorizontalOrigin):
    (WebCore::harfbuzzGetGlyphExtents):
    (WebCore::harfbuzzCairoTextGetFontFuncs):
    (WebCore::harfbuzzCairoGetTable):
    (WebCore::HarfBuzzNGFace::createFace):
    (WebCore::HarfBuzzNGFace::createFont):
    (WebCore::HarfBuzzShaper::createGlyphBufferAdvance):
    
    Source/WebKit:
    
    Adding includes for harfbuzz folders.
    
    * CMakeLists.txt:
    
    Source/WebKit2:
    
    Adding includes for harfbuzz folders.
    
    * CMakeLists.txt:
    
    Tools:
    
    Bringing Harfbuzz support to EFL with this patch, so we need HarfBuzz in the pulled in jhbuild dependencies.
    
    * WebKitTestRunner/CMakeLists.txt: Adding additional header include directories.
    * efl/jhbuild.modules: Adding source for HarfBuzz release version 0.9.0.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    868e06e2