[Cairo] Add complex font drawing using HarfbuzzNG
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Jul 2012 11:32:44 +0000 (11:32 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Jul 2012 11:32:44 +0000 (11:32 +0000)
commitc7291abbfcd01f9530958a21eecf622a8409d359
tree16d764de402cc7714f22cecc2d9518b8b73dd265
parentd6cf1cc33397c3ea68f1fa2737ed0c0ff5d7842d
[Cairo] Add complex font drawing using HarfbuzzNG
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: https://svn.webkit.org/repository/webkit/trunk@123864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
ChangeLog
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/PlatformEfl.cmake
Source/WebCore/WebCore.gypi
Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/efl/FontEfl.cpp [deleted file]
Source/WebCore/platform/graphics/freetype/FontPlatformData.h
Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp
Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzNGFaceCairo.cpp [new file with mode: 0644]
Source/WebKit/CMakeLists.txt
Source/WebKit/ChangeLog
Source/WebKit2/CMakeLists.txt
Source/WebKit2/ChangeLog
Source/cmake/FindHarfBuzz.cmake [new file with mode: 0644]
Source/cmake/OptionsEfl.cmake
Tools/ChangeLog
Tools/WebKitTestRunner/CMakeLists.txt
Tools/efl/jhbuild.modules