[FreeType] Vertical CJK glyphs should not be rendered with synthetic oblique
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 May 2015 17:52:43 +0000 (17:52 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 May 2015 17:52:43 +0000 (17:52 +0000)
commit9e4a420993586db9496e8581292113b25c54ae8e
tree4d2c771152c71100a27cc6a060e7fed2dfdb502c
parent0052f989fe15b516670488b524e9fa4a9c98df48
[FreeType] Vertical CJK glyphs should not be rendered with synthetic oblique
https://bugs.webkit.org/show_bug.cgi?id=144612

Reviewed by Darin Adler.

Source/WebCore:

No new tests. This causes fast/text/international/synthesized-italic-vertical.html to pass.

* platform/graphics/Font.cpp:
(WebCore::Font::nonSyntheticItalicFont): Compile this method for Cairo as well.
* platform/graphics/FontCascadeFonts.cpp:
(WebCore::FontCascadeFonts::glyphDataForSystemFallback): When searching for the system fallback,
ensure that we do not use synthetic oblique when rendering vertical CJK glyphs.
(WebCore::FontCascadeFonts::glyphDataForNormalVariant): Extend the CJK fix to Cairo ports.
* platform/graphics/FontPlatformData.h:
(WebCore::FontPlatformData::setSyntheticOblique): Added this helper method, because
Freetype/Cairo ports needs to be able to recreate the scaled font matrix when the
synthetic oblique settings changes.
* platform/graphics/freetype/FontPlatformData.h: Rename initializeWithFontFace to buildScaledFont.
Remove the now unused m_horizontalOrientationMatrix member.
(WebCore::FontPlatformData::setSyntheticOblique): Added the helper here as well.
* platform/graphics/freetype/FontPlatformDataFreeType.cpp:
(WebCore::FontPlatformData::FontPlatformData): Calculate whether or not to use synthetic oblique here,
before buildScaledFont is called. Call buildScaledFont instead of initializeWithFontFace.
(WebCore::FontPlatformData::operator=):
(WebCore::FontPlatformData::buildScaledFont): Renamed from initializeWithFontFace, does
the same thing, except calculate whether or not to use synthetic oblique. Instead just
reads the value.
(WebCore::FontPlatformData::setOrientation): Instead of adjusting the font matrix, recreate
the entire font.
(WebCore::FontPlatformData::setSyntheticOblique): Added.
(WebCore::rotateCairoMatrixForVerticalOrientation): Deleted.
(WebCore::FontPlatformData::initializeWithFontFace): Deleted.

LayoutTests:

* platform/gtk/TestExpectations: Remove expectation for failing test.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/gtk/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/Font.cpp
Source/WebCore/platform/graphics/FontCascadeFonts.cpp
Source/WebCore/platform/graphics/FontPlatformData.h
Source/WebCore/platform/graphics/freetype/FontPlatformData.h
Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp