Changeset 195150 in webkit


Ignore:
Timestamp:
Jan 15, 2016 2:58:45 PM (8 years ago)
Author:
mmaxfield@apple.com
Message:

[Cocoa] Font features are not applied to the system font
https://bugs.webkit.org/show_bug.cgi?id=153053

Reviewed by Dean Jackson.

Source/WebCore:

We simply need to call preparePlatformFont() on it.

Test: fast/text/system-font-features.html

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::fontWithFamily):

LayoutTests:

  • fast/text/system-font-features-expected.html: Added.
  • fast/text/system-font-features.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r195148 r195150  
     12016-01-15  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        [Cocoa] Font features are not applied to the system font
     4        https://bugs.webkit.org/show_bug.cgi?id=153053
     5
     6        Reviewed by Dean Jackson.
     7
     8        * fast/text/system-font-features-expected.html: Added.
     9        * fast/text/system-font-features.html: Added.
     10
    1112016-01-15  Joseph Pecoraro  <pecoraro@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r195149 r195150  
     12016-01-15  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        [Cocoa] Font features are not applied to the system font
     4        https://bugs.webkit.org/show_bug.cgi?id=153053
     5
     6        Reviewed by Dean Jackson.
     7
     8        We simply need to call preparePlatformFont() on it.
     9
     10        Test: fast/text/system-font-features.html
     11
     12        * platform/graphics/cocoa/FontCacheCoreText.cpp:
     13        (WebCore::fontWithFamily):
     14
    1152016-01-15  Tim Horton  <timothy_horton@apple.com>
    216
  • trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp

    r194318 r195150  
    677677    if (family.isEmpty())
    678678        return nullptr;
    679     if (auto specialCase = platformFontWithFamilySpecialCase(family, weight, desiredTraits, size))
    680         return specialCase;
     679
     680    RetainPtr<CTFontRef> foundFont = platformFontWithFamilySpecialCase(family, weight, desiredTraits, size);
     681    if (!foundFont) {
    681682#if ENABLE(PLATFORM_FONT_LOOKUP)
    682     RetainPtr<CTFontRef> foundFont = platformFontLookupWithFamily(family, desiredTraits, weight, size);
     683        foundFont = platformFontLookupWithFamily(family, desiredTraits, weight, size);
    683684#else
    684     UNUSED_PARAM(featureSettings);
    685     UNUSED_PARAM(variantSettings);
    686     RetainPtr<CTFontRef> foundFont = platformFontWithFamily(family, desiredTraits, weight, textRenderingMode, size);
     685        foundFont = platformFontWithFamily(family, desiredTraits, weight, textRenderingMode, size);
    687686#endif
     687    }
    688688    return preparePlatformFont(foundFont.get(), textRenderingMode, nullptr, nullptr, featureSettings, variantSettings);
    689689}
Note: See TracChangeset for help on using the changeset viewer.