+2014-12-08 Myles C. Maxfield <mmaxfield@apple.com>
+
+ [iOS] Narrow non-breaking space does not fall back to a correct font
+ https://bugs.webkit.org/show_bug.cgi?id=139335
+
+ Reviewed by Enrica Casucci.
+
+ * fast/text/narrow-non-breaking-space-expected.html: Added.
+ * fast/text/narrow-non-breaking-space.html: Added.
+
2014-12-08 Javier Fernandez <jfernandez@igalia.com>
[CSS Grid Layout] Grid items must set a new formatting context.
+2014-12-08 Myles C. Maxfield <mmaxfield@apple.com>
+
+ [iOS] Narrow non-breaking space does not fall back to a correct font
+ https://bugs.webkit.org/show_bug.cgi?id=139335
+
+ Reviewed by Enrica Casucci.
+
+ Test: fast/text/narrow-non-breaking-space.html
+
+ * platform/graphics/ios/FontCacheIOS.mm:
+ (WebCore::requiresCustomFallbackFont):
+ (WebCore::FontCache::getCustomFallbackFont):
+
2014-12-08 Daniel Bates <dabates@apple.com>
[iOS] Fix the WebKit build with the public SDK
static inline bool requiresCustomFallbackFont(const UInt32 character)
{
- return character == AppleLogo || character == blackCircle;
+ return character == AppleLogo || character == blackCircle || character == narrowNonBreakingSpace;
}
static CFCharacterSetRef copyFontCharacterSet(CFStringRef fontName)
FontPlatformData* FontCache::getCustomFallbackFont(const UInt32 c, const FontDescription& description)
{
ASSERT(requiresCustomFallbackFont(c));
- if (c == AppleLogo) {
- static NeverDestroyed<AtomicString> helveticaFamily("Helvetica Neue", AtomicString::ConstructFromLiteral);
- return getCachedFontPlatformData(description, helveticaFamily);
- }
- if (c == blackCircle) {
- static NeverDestroyed<AtomicString> lockClockFamily("LockClock-Light", AtomicString::ConstructFromLiteral);
- return getCachedFontPlatformData(description, lockClockFamily);
+
+ static NeverDestroyed<AtomicString> helveticaFamily("Helvetica Neue", AtomicString::ConstructFromLiteral);
+ static NeverDestroyed<AtomicString> lockClockFamily("LockClock-Light", AtomicString::ConstructFromLiteral);
+ static NeverDestroyed<AtomicString> timesNewRomanPSMTFamily("TimesNewRomanPSMT", AtomicString::ConstructFromLiteral);
+
+ AtomicString* family = nullptr;
+ switch (c) {
+ case AppleLogo:
+ family = &helveticaFamily.get();
+ break;
+ case blackCircle:
+ family = &lockClockFamily.get();
+ break;
+ case narrowNonBreakingSpace:
+ family = ×NewRomanPSMTFamily.get();
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ return nullptr;
}
- return nullptr;
+ ASSERT(family);
+ if (!family)
+ return nullptr;
+ return getCachedFontPlatformData(description, *family);
}
static inline FontTraitsMask toTraitsMask(CTFontSymbolicTraits ctFontTraits)