[iOS] Support Khmer and Lao fallback fonts
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jun 2014 21:17:39 +0000 (21:17 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jun 2014 21:17:39 +0000 (21:17 +0000)
commit0a1daa998bb976fb3ba87bfbb1f824d9d1659899
treee1928e5631811bd2bc0d41176b22264bc346852b
parentf0188565545a3edebd2c75939db8bd187aab6977
[iOS] Support Khmer and Lao fallback fonts
https://bugs.webkit.org/show_bug.cgi?id=134114

Reviewed by Enrica Casucci.

Source/WebCore:
iOS has fonts which have glyphs for the Khmer and Lao languages.

This patch also does a little refactoring of the language-specific fallback
font path to increase readability.

Test: fast/text/khmer-lao-font.html

* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::languageSpecificFallbackFont):
(WebCore::FontCache::systemFallbackForCharacters):

LayoutTests:
Simply dump the render tree of a page that includes Khmer and Lao text. The success
of this test depends on font font metrics being different than system fallback font
(which just shows rectangles instead of glyphs).

* fast/text/khmer-lao-font.html: Added.
* platform/ios-sim/fast/text/khmer-lao-font-expected.txt: Added.
* platform/mac/fast/text/khmer-lao-font-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170207 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/text/khmer-lao-font.html [new file with mode: 0644]
LayoutTests/platform/ios-sim/fast/text/khmer-lao-font-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/text/khmer-lao-font-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/ios/FontCacheIOS.mm