[Chromium] FontHarfBuzz.cpp should not use drawTextOnPath().
authorbashi@chromium.org <bashi@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Sep 2012 00:13:34 +0000 (00:13 +0000)
committerbashi@chromium.org <bashi@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Sep 2012 00:13:34 +0000 (00:13 +0000)
commit629a25b25c46afa8b2c8b82b986416bafdec9296
treecd9f756e9279ca7c05c63c4c78268d9063912203
parent78877dbbfc1f8465d8a45dc5462058954f3530da
[Chromium] FontHarfBuzz.cpp should not use drawTextOnPath().
https://bugs.webkit.org/show_bug.cgi?id=97676

Reviewed by Tony Chang.

Use drawPosText() if possible for vertical text.
Use drawTextOnPath() only if the font doesn't have vhea/vmtx table.

No new tests. No change in behavior on LayoutTests.
Confirmed improvement in vertical text positioning using ipafont and Skia r5677.

* platform/graphics/harfbuzz/FontHarfBuzz.cpp:
(WebCore::drawVerticalTextWithBrokenIdeographs): Added.
(WebCore):
(WebCore::Font::drawGlyphs): Draw vertical text by drawPosText() in a similar manner of FontSkia.cpp.
(WebCore::Font::drawComplexText): Disable setVerticalText(). Complex path doesn't support it now.
* platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
(WebCore::FontPlatformData::setupPaint): Call setVertialText().
* platform/graphics/skia/SimpleFontDataSkia.cpp:
(WebCore::SimpleFontData::platformWidthForGlyph): Disable setVerticalText() if the font doesn't have vertical metrics.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@129823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/harfbuzz/FontHarfBuzz.cpp
Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp
Source/WebCore/platform/graphics/skia/SimpleFontDataSkia.cpp