https://bugs.webkit.org/show_bug.cgi?id=138906
Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2014-12-15
Reviewed by Darin Adler.
Source/WebCore:
Use SPI CTFontCreateForCharacters(), but only if we don't already know what to do
with the characters.
Test: platform/ios-simulator/fast/text/non-language-font-fallback.html
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::FontCache::systemFallbackForCharacters):
* platform/spi/cocoa/CoreTextSPI.h:
LayoutTests:
* platform/ios-simulator/fast/text/non-language-font-fallback-expected.html: Added.
* platform/ios-simulator/fast/text/non-language-font-fallback.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177292
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2014-12-15 Myles C. Maxfield <mmaxfield@apple.com>
+
+ [iOS] Codepoints not associated with languages are drawn as boxes
+ https://bugs.webkit.org/show_bug.cgi?id=138906
+
+ Reviewed by Darin Adler.
+
+ * platform/ios-simulator/fast/text/non-language-font-fallback-expected.html: Added.
+ * platform/ios-simulator/fast/text/non-language-font-fallback.html: Added.
+
2014-12-15 Alexey Proskuryakov <ap@apple.com>
http/tests/misc/webtiming-origins.html is flaky
--- /dev/null
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+This test makes sure that glyphs not associated with a particular language have an appropriate font chosen for them.
+<div style="font-size: 256px; font-family: Menlo-Regular;">☚</div>
+</body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+This test makes sure that glyphs not associated with a particular language have an appropriate font chosen for them.
+<div style="font-size: 256px;">☚</div>
+</body>
+</html>
+2014-12-15 Myles C. Maxfield <mmaxfield@apple.com>
+
+ [iOS] Codepoints not associated with languages are drawn as boxes
+ https://bugs.webkit.org/show_bug.cgi?id=138906
+
+ Reviewed by Darin Adler.
+
+ Use SPI CTFontCreateForCharacters(), but only if we don't already know what to do
+ with the characters.
+
+ Test: platform/ios-simulator/fast/text/non-language-font-fallback.html
+
+ * platform/graphics/ios/FontCacheIOS.mm:
+ (WebCore::FontCache::systemFallbackForCharacters):
+ * platform/spi/cocoa/CoreTextSPI.h:
+
2014-12-15 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Shapes] Fix StyleBuilder code to use CSSValueNone to match spec and other code
}
if (useEmojiFont)
simpleFontData = getCachedFontData(description, appleColorEmoji, false, DoNotRetain);
+ else {
+ RetainPtr<CTFontRef> fallbackFont = adoptCF(CTFontCreateForCharacters(originalFontData->getCTFont(), characters, length, nullptr));
+ if (RetainPtr<CFStringRef> foundFontName = adoptCF(CTFontCopyPostScriptName(fallbackFont.get())))
+ simpleFontData = getCachedFontData(description, foundFontName.get(), false, DoNotRetain);
+ }
break;
}
}
bool CTFontIsAppleColorEmoji(CTFontRef);
bool CTFontDescriptorIsSystemUIFont(CTFontDescriptorRef);
CTFontRef CTFontCreateForCSS(CFStringRef name, uint16_t weight, CTFontSymbolicTraits, CGFloat size);
+CTFontRef CTFontCreateForCharacters(CTFontRef currentFont, const UTF16Char *characters, CFIndex length, CFIndex *coveredLength);
}