Fonts forced to use non synthetic italics might be laid out with the incorrect baseline
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Aug 2014 23:13:18 +0000 (23:13 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Aug 2014 23:13:18 +0000 (23:13 +0000)
commit521d5ebe93d54ac4a9a24d624d7cd2731ebe525a
tree3e2b355d63e70ee7ebb2744dc9f5e0b2e2e1e6e5
parentb1c0645f3314c391e8368cd4567f8345d75b65e2
Fonts forced to use non synthetic italics might be laid out with the incorrect baseline
https://bugs.webkit.org/show_bug.cgi?id=135403

Reviewed by Darin Adler.

Source/WebCore:

When italics is specified on a font, and the font isn't coming from the cache, we ask
the SimpleFontData to provide a non-synthetic-italic version of itself. Our current
implementation doesn't preserve whether or not the SimpleFontData includes vertical
glyphs (glyphs that are not rotated when drawn in the vertical writing mode), which
determines which baseline we use to lay out the text. By passing "false" to
the isTextOrientationFallback argument to SimpleFontData::create(), we preserve this
hasVerticalGlyphs flag.

Test: fast/text/international/synthesized-italic-vertical-latin-double.html

* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::nonSyntheticItalicFontData):
* testing/Internals.cpp:
(WebCore::Internals::invalidateFontCache): Add "invalidateFontCache" to window.internals.
* testing/Internals.h: Ditto.
* testing/Internals.idl: Ditto.

LayoutTests:

Laying out the same string twice (where there is a cache collision) should be rendered
the same as laying out similar strings (where there is no cache collision).

* fast/text/international/synthesized-italic-vertical-latin-double-expected.html: Added.
* fast/text/international/synthesized-italic-vertical-latin-double.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/text/international/synthesized-italic-vertical-latin-double-expected.html [new file with mode: 0644]
LayoutTests/fast/text/international/synthesized-italic-vertical-latin-double.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/SimpleFontData.cpp
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl