Make sure to set kCTFontFallbackOptionAttribute to kCTFontFallbackOptionSystem for...
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Jul 2019 18:34:29 +0000 (18:34 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Jul 2019 18:34:29 +0000 (18:34 +0000)
https://bugs.webkit.org/show_bug.cgi?id=199769
<rdar://problem/49390297>

Reviewed by Myles C. Maxfield.

Source/WebCore:

When getting a system font, set the appropriate attribute so that it
does not fallback to a user initiated font.
Add an ASSERT that checks that the font in use is not a user font if
policy is to not use user installed fonts.

Tests: fast/text/user-installed-fonts/extended-character-with-user-font.html
       fast/text/user-installed-fonts/extended-character.html

* platform/graphics/Font.h:
* platform/graphics/FontCascadeFonts.cpp:
(WebCore::FontCascadeFonts::glyphDataForSystemFallback):
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::preparePlatformFont):
(WebCore::FontDatabase::singletonAllowingUserInstalledFonts):
(WebCore::FontDatabase::singletonDisallowingUserInstalledFonts):
(WebCore::addAttributesForInstalledFonts):
(WebCore::addAttributesForWebFonts):
(WebCore::installedFontMandatoryAttributes):
* platform/graphics/mac/SimpleFontDataCoreText.cpp:
(WebCore::Font::isUserInstalledFont const):

Source/WTF:

* wtf/Platform.h:

Tools:

Add a font containing one extended character not found in system fonts.

* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
* WebKitTestRunner/fonts/FakeHelvetica-SingleExtendedCharacter.ttf: Added.

LayoutTests:

Tests require WTR and recent MacOS, hence why they are disabled elsewhere.

* TestExpectations:
* platform/mac-wk2/TestExpectations:
* fast/text/user-installed-fonts/extended-character-expected.html: Added.
* fast/text/user-installed-fonts/extended-character-with-user-font-expected-mismatch.html: Added.
* fast/text/user-installed-fonts/extended-character-with-user-font.html: Added.
* fast/text/user-installed-fonts/extended-character.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247566 268f45cc-cd09-0410-ab3c-d52691b4dbfc

17 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/fast/text/user-installed-fonts/extended-character-expected.html [new file with mode: 0644]
LayoutTests/fast/text/user-installed-fonts/extended-character-with-user-font-expected-mismatch.html [new file with mode: 0644]
LayoutTests/fast/text/user-installed-fonts/extended-character-with-user-font.html [new file with mode: 0644]
LayoutTests/fast/text/user-installed-fonts/extended-character.html [new file with mode: 0644]
LayoutTests/platform/mac-wk2/TestExpectations
Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/Font.h
Source/WebCore/platform/graphics/FontCascadeFonts.cpp
Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp
Tools/ChangeLog
Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj
Tools/WebKitTestRunner/fonts/FakeHelvetica-SingleExtendedCharacter.ttf [new file with mode: 0644]

index fa7c18f..7c2f5e9 100644 (file)
@@ -1,3 +1,20 @@
+2019-07-18  Youenn Fablet  <youenn@apple.com>
+
+        Make sure to set kCTFontFallbackOptionAttribute to kCTFontFallbackOptionSystem for system fonts
+        https://bugs.webkit.org/show_bug.cgi?id=199769
+        <rdar://problem/49390297>
+
+        Reviewed by Myles C. Maxfield.
+
+        Tests require WTR and recent MacOS, hence why they are disabled elsewhere.
+
+        * TestExpectations:
+        * platform/mac-wk2/TestExpectations:
+        * fast/text/user-installed-fonts/extended-character-expected.html: Added.
+        * fast/text/user-installed-fonts/extended-character-with-user-font-expected-mismatch.html: Added.
+        * fast/text/user-installed-fonts/extended-character-with-user-font.html: Added.
+        * fast/text/user-installed-fonts/extended-character.html: Added.
+
 2019-07-18  Truitt Savell  <tsavell@apple.com>
 
         Rebaseline imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/centering.html
index b8ba9b7..9abd5e1 100644 (file)
@@ -1669,6 +1669,10 @@ webkit.org/b/148884 imported/w3c/web-platform-tests/html/semantics/forms/textfie
 webkit.org/b/190626 imported/w3c/web-platform-tests/html/semantics/forms/the-datalist-element/datalistoptions.html [ Failure ]
 webkit.org/b/190613 imported/blink/fast/forms/datalist/slider-appearance-with-ticks-crash.html [ Skip ]
 
+# Tests require WTR and disabling of user installed fonts. Reenabling them in supported platforms
+fast/text/user-installed-fonts/extended-character.html [ Skip ]
+fast/text/user-installed-fonts/extended-character-with-user-font.html [ Skip ]
+
 # Does timeout
 imported/w3c/web-platform-tests/webaudio/idlharness.https.html [ Skip ]
 # Do assert in OfflineAudioContext
diff --git a/LayoutTests/fast/text/user-installed-fonts/extended-character-expected.html b/LayoutTests/fast/text/user-installed-fonts/extended-character-expected.html
new file mode 100644 (file)
index 0000000..3d5f6fb
--- /dev/null
@@ -0,0 +1,10 @@
+<!doctype html>
+<html>
+    <head>
+        <meta charset="UTF-8">
+    </head>
+    <body>
+        <!-- unknown character -->
+        <td>&#x011740;</td>
+    </body>
+</html>
diff --git a/LayoutTests/fast/text/user-installed-fonts/extended-character-with-user-font-expected-mismatch.html b/LayoutTests/fast/text/user-installed-fonts/extended-character-with-user-font-expected-mismatch.html
new file mode 100644 (file)
index 0000000..3d5f6fb
--- /dev/null
@@ -0,0 +1,10 @@
+<!doctype html>
+<html>
+    <head>
+        <meta charset="UTF-8">
+    </head>
+    <body>
+        <!-- unknown character -->
+        <td>&#x011740;</td>
+    </body>
+</html>
diff --git a/LayoutTests/fast/text/user-installed-fonts/extended-character-with-user-font.html b/LayoutTests/fast/text/user-installed-fonts/extended-character-with-user-font.html
new file mode 100644 (file)
index 0000000..1dabf2a
--- /dev/null
@@ -0,0 +1,14 @@
+<!doctype html>
+<html>
+    <head>
+        <meta charset="UTF-8">
+    </head>
+    <body>
+        <script>
+if (window.testRunner)
+    testRunner.installFakeHelvetica("SingleExtendedCharacter");
+        </script>
+        <!-- Character known by user installed font only -->
+        <td>&#x011721;</td>
+    </body>
+</html>
diff --git a/LayoutTests/fast/text/user-installed-fonts/extended-character.html b/LayoutTests/fast/text/user-installed-fonts/extended-character.html
new file mode 100644 (file)
index 0000000..4c23f9d
--- /dev/null
@@ -0,0 +1,16 @@
+<!doctype html>
+<html>
+    <head>
+        <meta charset="UTF-8">
+    </head>
+    <body>
+        <script>
+if (window.internals)
+    internals.settings.setShouldAllowUserInstalledFonts(false);
+if (window.testRunner)
+    testRunner.installFakeHelvetica("SingleExtendedCharacter");
+        </script>
+        <!-- Character known by user installed font only -->
+        <td>&#x011721;</td>
+    </body>
+</html>
index d657bc7..307ecbe 100644 (file)
@@ -773,6 +773,10 @@ webkit.org/b/185962 media/video-play-audio-require-user-gesture.html [ Pass Fail
 webkit.org/b/185994 fast/text/user-installed-fonts/shadow-family.html [ Pass ImageOnlyFailure ]
 webkit.org/b/185994 fast/text/user-installed-fonts/shadow-postscript-family.html [ Pass ImageOnlyFailure ]
 
+# Reenabled tests for supported platforms
+[ Mojave+ ] fast/text/user-installed-fonts/extended-character.html [ Pass ]
+[ Mojave+ ] fast/text/user-installed-fonts/extended-character-with-user-font.html [ Pass ]
+
 # <rdar://problem/25010307>
 [ HighSierra+ ] http/tests/ssl/applepay/ApplePayError.html [ Pass ]
 [ HighSierra+ ] http/tests/ssl/applepay/ApplePaySessionV3.html [ Pass ]
index 5584f3b..2fe98a9 100644 (file)
@@ -1,3 +1,13 @@
+2019-07-18  Youenn Fablet  <youenn@apple.com>
+
+        Make sure to set kCTFontFallbackOptionAttribute to kCTFontFallbackOptionSystem for system fonts
+        https://bugs.webkit.org/show_bug.cgi?id=199769
+        <rdar://problem/49390297>
+
+        Reviewed by Myles C. Maxfield.
+
+        * wtf/Platform.h:
+
 2019-07-17  Christopher Reid  <chris.reid@sony.com>
 
         Bytecode cache should use FileSystem
index 97e4e6a..88131b6 100644 (file)
 #define ENABLE_MONOSPACE_FONT_EXCEPTION (__IPHONE_OS_VERSION_MIN_REQUIRED < 130000)
 #endif
 
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || PLATFORM(IOS_FAMILY)
+#define HAVE_DISALLOWABLE_USER_INSTALLED_FONTS 1
+#endif
+
 #if PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000
 #define HAVE_ARKIT_QUICK_LOOK_PREVIEW_ITEM 1
 #endif
index ebc2c75..6191622 100644 (file)
@@ -1,3 +1,32 @@
+2019-07-18  Youenn Fablet  <youenn@apple.com>
+
+        Make sure to set kCTFontFallbackOptionAttribute to kCTFontFallbackOptionSystem for system fonts
+        https://bugs.webkit.org/show_bug.cgi?id=199769
+        <rdar://problem/49390297>
+
+        Reviewed by Myles C. Maxfield.
+
+        When getting a system font, set the appropriate attribute so that it
+        does not fallback to a user initiated font.
+        Add an ASSERT that checks that the font in use is not a user font if
+        policy is to not use user installed fonts.
+
+        Tests: fast/text/user-installed-fonts/extended-character-with-user-font.html
+               fast/text/user-installed-fonts/extended-character.html
+
+        * platform/graphics/Font.h:
+        * platform/graphics/FontCascadeFonts.cpp:
+        (WebCore::FontCascadeFonts::glyphDataForSystemFallback):
+        * platform/graphics/cocoa/FontCacheCoreText.cpp:
+        (WebCore::preparePlatformFont):
+        (WebCore::FontDatabase::singletonAllowingUserInstalledFonts):
+        (WebCore::FontDatabase::singletonDisallowingUserInstalledFonts):
+        (WebCore::addAttributesForInstalledFonts):
+        (WebCore::addAttributesForWebFonts):
+        (WebCore::installedFontMandatoryAttributes):
+        * platform/graphics/mac/SimpleFontDataCoreText.cpp:
+        (WebCore::Font::isUserInstalledFont const):
+
 2019-07-18  Zalan Bujtas  <zalan@apple.com>
 
         [LFC][IFC] InlineFormattingContext::LineLayout::placeInlineItems is getting too complex.
index 3ca9788..2e58bd6 100644 (file)
@@ -204,6 +204,10 @@ public:
     const BitVector& glyphsSupportedByAllPetiteCaps() const;
 #endif
 
+#if HAVE(DISALLOWABLE_USER_INSTALLED_FONTS)
+    bool isUserInstalledFont() const;
+#endif
+
     bool canRenderCombiningCharacterSequence(const UChar*, size_t) const;
     bool applyTransforms(GlyphBufferGlyph*, GlyphBufferAdvance*, size_t glyphCount, bool enableKerning, bool requiresShaping) const;
 
index 694469c..db74302 100644 (file)
@@ -349,6 +349,10 @@ GlyphData FontCascadeFonts::glyphDataForSystemFallback(UChar32 character, const
     if (!systemFallbackFont)
         return GlyphData();
 
+#if HAVE(DISALLOWABLE_USER_INSTALLED_FONTS)
+    ASSERT(!systemFallbackFont->isUserInstalledFont() || description.shouldAllowUserInstalledFonts() == AllowUserInstalledFonts::Yes);
+#endif
+
     if (systemFallbackShouldBeInvisible)
         systemFallbackFont = const_cast<Font*>(&systemFallbackFont->invisibleFont());
 
index 6a0e098..8a9dba3 100644 (file)
@@ -40,7 +40,6 @@
 #include <wtf/NeverDestroyed.h>
 
 #define HAS_CORE_TEXT_WIDTH_ATTRIBUTE ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000))
-#define CAN_DISALLOW_USER_INSTALLED_FONTS ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000))
 
 namespace WebCore {
 
@@ -572,7 +571,7 @@ RetainPtr<CTFontRef> preparePlatformFont(CTFontRef originalFont, const FontDescr
     bool fontFaceDoesntSpecifyFeatures = !fontFaceFeatures || fontFaceFeatures->isEmpty();
     bool fontFaceDoesntSpecifyVariations = !fontFaceVariantSettings || fontFaceVariantSettings->isAllNormal();
     if (noFontFeatureSettings && noFontVariationSettings && textRenderingModeIsAuto && variantSettingsIsNormal && dontNeedToApplyOpticalSizing && fontFaceDoesntSpecifyFeatures && fontFaceDoesntSpecifyVariations)
-        return originalFont;
+        return createFontForInstalledFonts(originalFont, fontDescription.shouldAllowUserInstalledFonts());
 
     // This algorithm is described at http://www.w3.org/TR/css3-fonts/#feature-precedence
     FeaturesMap featuresToBeApplied;
@@ -687,9 +686,10 @@ RetainPtr<CTFontRef> preparePlatformFont(CTFontRef originalFont, const FontDescr
 #endif
     }
 
+    addAttributesForInstalledFonts(attributes.get(), fontDescription.shouldAllowUserInstalledFonts());
+
     auto descriptor = adoptCF(CTFontDescriptorCreateWithAttributes(attributes.get()));
-    auto result = adoptCF(CTFontCreateCopyWithAttributes(originalFont, CTFontGetSize(originalFont), nullptr, descriptor.get()));
-    return result;
+    return adoptCF(CTFontCreateCopyWithAttributes(originalFont, CTFontGetSize(originalFont), nullptr, descriptor.get()));
 }
 
 RefPtr<Font> FontCache::similarFont(const FontDescription& description, const AtomString& family)
@@ -840,7 +840,7 @@ static inline bool isSystemFont(const AtomString& family)
 
 class FontDatabase {
 public:
-#if !CAN_DISALLOW_USER_INSTALLED_FONTS
+#if !HAVE(DISALLOWABLE_USER_INSTALLED_FONTS)
     static FontDatabase& singleton()
     {
         static NeverDestroyed<FontDatabase> database(AllowUserInstalledFonts::Yes);
@@ -850,7 +850,7 @@ public:
 
     static FontDatabase& singletonAllowingUserInstalledFonts()
     {
-#if CAN_DISALLOW_USER_INSTALLED_FONTS
+#if HAVE(DISALLOWABLE_USER_INSTALLED_FONTS)
         static NeverDestroyed<FontDatabase> database(AllowUserInstalledFonts::Yes);
         return database;
 #else
@@ -860,7 +860,7 @@ public:
 
     static FontDatabase& singletonDisallowingUserInstalledFonts()
     {
-#if CAN_DISALLOW_USER_INSTALLED_FONTS
+#if HAVE(DISALLOWABLE_USER_INSTALLED_FONTS)
         static NeverDestroyed<FontDatabase> database(AllowUserInstalledFonts::No);
         return database;
 #else
@@ -874,10 +874,15 @@ public:
     struct InstalledFont {
         InstalledFont() = default;
 
-        InstalledFont(CTFontDescriptorRef fontDescriptor)
+        InstalledFont(CTFontDescriptorRef fontDescriptor, AllowUserInstalledFonts allowUserInstalledFonts)
             : fontDescriptor(fontDescriptor)
             , capabilities(capabilitiesForFontDescriptor(fontDescriptor))
         {
+            if (allowUserInstalledFonts != AllowUserInstalledFonts::No)
+                return;
+            auto attributes = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
+            addAttributesForInstalledFonts(attributes.get(), allowUserInstalledFonts);
+            this->fontDescriptor = CTFontDescriptorCreateCopyWithAttributes(fontDescriptor, attributes.get());
         }
 
         RetainPtr<CTFontDescriptorRef> fontDescriptor;
@@ -935,7 +940,7 @@ public:
                 Vector<InstalledFont> result;
                 result.reserveInitialCapacity(count);
                 for (CFIndex i = 0; i < count; ++i) {
-                    InstalledFont installedFont(static_cast<CTFontDescriptorRef>(CFArrayGetValueAtIndex(matches.get(), i)));
+                    InstalledFont installedFont(static_cast<CTFontDescriptorRef>(CFArrayGetValueAtIndex(matches.get(), i)), m_allowUserInstalledFonts);
                     result.uncheckedAppend(WTFMove(installedFont));
                 }
                 return InstalledFontFamily(WTFMove(result));
@@ -964,7 +969,7 @@ public:
             auto fontDescriptorToMatch = adoptCF(CTFontDescriptorCreateWithAttributes(attributes.get()));
             auto mandatoryAttributes = installedFontMandatoryAttributes(m_allowUserInstalledFonts);
             auto match = adoptCF(CTFontDescriptorCreateMatchingFontDescriptor(fontDescriptorToMatch.get(), mandatoryAttributes.get()));
-            return InstalledFont(match.get());
+            return InstalledFont(match.get(), m_allowUserInstalledFonts);
         }).iterator->value;
     }
 
@@ -1508,7 +1513,7 @@ const AtomString& FontCache::platformAlternateFamilyName(const AtomString& famil
 
 void addAttributesForInstalledFonts(CFMutableDictionaryRef attributes, AllowUserInstalledFonts allowUserInstalledFonts)
 {
-#if CAN_DISALLOW_USER_INSTALLED_FONTS
+#if HAVE(DISALLOWABLE_USER_INSTALLED_FONTS)
     if (allowUserInstalledFonts == AllowUserInstalledFonts::No) {
         CFDictionaryAddValue(attributes, kCTFontUserInstalledAttribute, kCFBooleanFalse);
         CTFontFallbackOption fallbackOption = kCTFontFallbackOptionSystem;
@@ -1532,8 +1537,30 @@ RetainPtr<CTFontRef> createFontForInstalledFonts(CTFontDescriptorRef fontDescrip
     return adoptCF(CTFontCreateWithFontDescriptor(fontDescriptor, size, nullptr));
 }
 
+static inline bool isFontMatchingUserInstalledFontFallback(CTFontRef font, AllowUserInstalledFonts allowUserInstalledFonts)
+{
+#if HAVE(DISALLOWABLE_USER_INSTALLED_FONTS)
+    bool willFallbackToSystemOnly = false;
+    if (auto fontFallbackOptionAttributeRef = adoptCF(static_cast<CFNumberRef>(CTFontCopyAttribute(font, kCTFontFallbackOptionAttribute)))) {
+        int64_t fontFallbackOptionAttribute;
+        CFNumberGetValue(fontFallbackOptionAttributeRef.get(), kCFNumberSInt64Type, &fontFallbackOptionAttribute);
+        willFallbackToSystemOnly = fontFallbackOptionAttribute == kCTFontFallbackOptionSystem;
+    }
+
+    bool shouldFallbackToSystemOnly = allowUserInstalledFonts == AllowUserInstalledFonts::No;
+    return willFallbackToSystemOnly == shouldFallbackToSystemOnly;
+#else
+    UNUSED_PARAM(font);
+    UNUSED_PARAM(allowUserInstalledFonts);
+    return true;
+#endif
+}
+
 RetainPtr<CTFontRef> createFontForInstalledFonts(CTFontRef font, AllowUserInstalledFonts allowUserInstalledFonts)
 {
+    if (isFontMatchingUserInstalledFontFallback(font, allowUserInstalledFonts))
+        return font;
+
     auto attributes = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
     addAttributesForInstalledFonts(attributes.get(), allowUserInstalledFonts);
     if (CFDictionaryGetCount(attributes.get())) {
@@ -1545,7 +1572,7 @@ RetainPtr<CTFontRef> createFontForInstalledFonts(CTFontRef font, AllowUserInstal
 
 void addAttributesForWebFonts(CFMutableDictionaryRef attributes, AllowUserInstalledFonts allowUserInstalledFonts)
 {
-#if CAN_DISALLOW_USER_INSTALLED_FONTS
+#if HAVE(DISALLOWABLE_USER_INSTALLED_FONTS)
     if (allowUserInstalledFonts == AllowUserInstalledFonts::No) {
         CTFontFallbackOption fallbackOption = kCTFontFallbackOptionSystem;
         auto fallbackOptionNumber = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt64Type, &fallbackOption));
@@ -1559,7 +1586,7 @@ void addAttributesForWebFonts(CFMutableDictionaryRef attributes, AllowUserInstal
 
 RetainPtr<CFSetRef> installedFontMandatoryAttributes(AllowUserInstalledFonts allowUserInstalledFonts)
 {
-#if CAN_DISALLOW_USER_INSTALLED_FONTS
+#if HAVE(DISALLOWABLE_USER_INSTALLED_FONTS)
     if (allowUserInstalledFonts == AllowUserInstalledFonts::No) {
         CFTypeRef mandatoryAttributesValues[] = { kCTFontFamilyNameAttribute, kCTFontPostScriptNameAttribute, kCTFontEnabledAttribute, kCTFontUserInstalledAttribute, kCTFontFallbackOptionAttribute };
         return adoptCF(CFSetCreate(kCFAllocatorDefault, mandatoryAttributesValues, WTF_ARRAY_LENGTH(mandatoryAttributesValues), &kCFTypeSetCallBacks));
index 3358490..8103175 100644 (file)
@@ -28,6 +28,7 @@
 #include "Font.h"
 
 #include <CoreText/CoreText.h>
+#include <pal/spi/cocoa/CoreTextSPI.h>
 
 namespace WebCore {
 
@@ -53,4 +54,12 @@ CFDictionaryRef Font::getCFStringAttributes(bool enableKerning, FontOrientation
     return attributesDictionary.get();
 }
 
+#if HAVE(DISALLOWABLE_USER_INSTALLED_FONTS)
+bool Font::isUserInstalledFont() const
+{
+    auto isUserInstalledFont = adoptCF(static_cast<CFBooleanRef>(CTFontCopyAttribute(getCTFont(), kCTFontUserInstalledAttribute)));
+    return isUserInstalledFont && CFBooleanGetValue(isUserInstalledFont.get());
+}
+#endif
+
 } // namespace WebCore
index e065dd2..52a8fa3 100644 (file)
@@ -1,3 +1,16 @@
+2019-07-18  Youenn Fablet  <youenn@apple.com>
+
+        Make sure to set kCTFontFallbackOptionAttribute to kCTFontFallbackOptionSystem for system fonts
+        https://bugs.webkit.org/show_bug.cgi?id=199769
+        <rdar://problem/49390297>
+
+        Reviewed by Myles C. Maxfield.
+
+        Add a font containing one extended character not found in system fonts.
+
+        * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
+        * WebKitTestRunner/fonts/FakeHelvetica-SingleExtendedCharacter.ttf: Added.
+
 2019-07-18  Konstantin Tokarev  <annulen@yandex.ru>
 
         Unreviewed, Add Olivier Blin as contributor
index 4b47e89..18fc359 100644 (file)
@@ -96,6 +96,7 @@
                2E749BF21891EBFA007FC175 /* EventSenderProxyIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2E63ED7A1891ACE9002A7AFC /* EventSenderProxyIOS.mm */; };
                31DA8A3D1E7205CC00E1DF2F /* IOSLayoutTestCommunication.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3148A0531E6F85B600D3B316 /* IOSLayoutTestCommunication.cpp */; };
                41C5378E21F13414008B1FAD /* TestWebsiteDataStoreDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 41C5378D21F1333C008B1FAD /* TestWebsiteDataStoreDelegate.mm */; };
+               41D5B62622DD9D36000F4C4A /* FakeHelvetica-SingleExtendedCharacter.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 41D5B62522DD9D36000F4C4A /* FakeHelvetica-SingleExtendedCharacter.ttf */; };
                4430AE191F82C4FD0099915A /* GeneratedTouchesDebugWindow.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4430AE171F82C4EE0099915A /* GeneratedTouchesDebugWindow.mm */; };
                51058AD51D678820009A538C /* libWebCoreTestSupport.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 41230E16138C78BF00BCCFCA /* libWebCoreTestSupport.dylib */; };
                51058AD61D678825009A538C /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F5169CA1445222D00E0A9D7 /* WebKit.framework */; };
                4181731B138AD39D0057AAA4 /* WebCoreTestSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebCoreTestSupport.h; path = WebCoreTestSupport/WebCoreTestSupport.h; sourceTree = BUILT_PRODUCTS_DIR; };
                41C5378C21F1333C008B1FAD /* TestWebsiteDataStoreDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestWebsiteDataStoreDelegate.h; path = cocoa/TestWebsiteDataStoreDelegate.h; sourceTree = "<group>"; };
                41C5378D21F1333C008B1FAD /* TestWebsiteDataStoreDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = TestWebsiteDataStoreDelegate.mm; path = cocoa/TestWebsiteDataStoreDelegate.mm; sourceTree = "<group>"; };
+               41D5B62522DD9D36000F4C4A /* FakeHelvetica-SingleExtendedCharacter.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "FakeHelvetica-SingleExtendedCharacter.ttf"; path = "fonts/FakeHelvetica-SingleExtendedCharacter.ttf"; sourceTree = "<group>"; };
                4429FC5E1627089600F66D8B /* WorkQueueManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WorkQueueManager.cpp; sourceTree = "<group>"; };
                4429FC611627089600F66D8B /* WorkQueueManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WorkQueueManager.h; sourceTree = "<group>"; };
                4430AE171F82C4EE0099915A /* GeneratedTouchesDebugWindow.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = GeneratedTouchesDebugWindow.mm; sourceTree = "<group>"; };
                                1CBA02931FD86EA100179C7D /* FakeHelvetica-Helvetica-500.ttf */,
                                1CBA02921FD86EA100179C7D /* FakeHelvetica-Helvetica2-400.ttf */,
                                1CBA02951FD86EA100179C7D /* FakeHelvetica-Helvetica2-500.ttf */,
+                               41D5B62522DD9D36000F4C4A /* FakeHelvetica-SingleExtendedCharacter.ttf */,
                                1CA211C71BCA107300B2101F /* FontWithFeatures.otf */,
                                1CA211C81BCA107300B2101F /* FontWithFeatures.ttf */,
                                BC25186311D15D54002EBC01 /* InjectedBundle-Info.plist */,
                                1CBA02981FD87DF000179C7D /* FakeHelvetica-Helvetica-500.ttf in Resources */,
                                1CBA02971FD87DEE00179C7D /* FakeHelvetica-Helvetica2-400.ttf in Resources */,
                                1CBA02961FD87DEC00179C7D /* FakeHelvetica-Helvetica2-500.ttf in Resources */,
+                               41D5B62622DD9D36000F4C4A /* FakeHelvetica-SingleExtendedCharacter.ttf in Resources */,
                                1CA211C91BCA107300B2101F /* FontWithFeatures.otf in Resources */,
                                1CA211CA1BCA107300B2101F /* FontWithFeatures.ttf in Resources */,
                                6510A78411EC643800410867 /* WebKitWeightWatcher100.ttf in Resources */,
diff --git a/Tools/WebKitTestRunner/fonts/FakeHelvetica-SingleExtendedCharacter.ttf b/Tools/WebKitTestRunner/fonts/FakeHelvetica-SingleExtendedCharacter.ttf
new file mode 100644 (file)
index 0000000..40f0d0e
Binary files /dev/null and b/Tools/WebKitTestRunner/fonts/FakeHelvetica-SingleExtendedCharacter.ttf differ