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