Changeset 218616 in webkit
- Timestamp:
- Jun 20, 2017 4:52:22 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r218614 r218616 1 2017-06-20 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [Cocoa] The system Japanese font cannot be italicized 4 https://bugs.webkit.org/show_bug.cgi?id=173300 5 <rdar://problem/31805407> 6 7 Reviewed by Ryosuke Niwa. 8 9 * fast/text/system-font-japanese-synthetic-italic-expected-mismatch.html: Added. 10 * fast/text/system-font-japanese-synthetic-italic.html: Added. 11 * platform/mac/TestExpectations: This codepath doesn't work in El Capitan. 12 1 13 2017-06-20 Ryan Haddad <ryanhaddad@apple.com> 2 14 -
trunk/LayoutTests/platform/mac/TestExpectations
r218614 r218616 1606 1606 webkit.org/b/173487 imported/w3c/web-platform-tests/IndexedDB/large-nested-cloning.html [ Pass Failure ] 1607 1607 1608 webkit.org/b/313156 [ ElCapitan ] fast/text/system-font-japanese-synthetic-italic.html [ ImageOnlyFailure ] -
trunk/Source/WebCore/ChangeLog
r218615 r218616 1 2017-06-20 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [Cocoa] The system Japanese font cannot be italicized 4 https://bugs.webkit.org/show_bug.cgi?id=173300 5 <rdar://problem/31805407> 6 7 Reviewed by Ryosuke Niwa. 8 9 Items in the system font cascade list may lie about whether or not they support italics. 10 In order to get the truth, we need to use the physical font underlying the font in question, 11 because this one won't lie. Then, we can interrogate this physical font about its traits 12 in order to synthesize italics correctly. 13 14 Test: fast/text/system-font-japanese-synthetic-italic.html 15 16 * platform/graphics/cocoa/FontCacheCoreText.cpp: 17 (WebCore::lookupFallbackFont): 18 * platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp: 19 (WebCore::FontFamilySpecificationCoreText::fontRanges): 20 1 21 2017-06-20 Chris Dumez <cdumez@apple.com> 2 22 -
trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
r218614 r218616 1293 1293 1294 1294 CFIndex coveredLength = 0; 1295 auto result = adoptCF(CTFontCreateForCharactersWithLanguage(font, characters, length, localeString.get(), &coveredLength)); 1295 RetainPtr<CTFontRef> result; 1296 #if !USE_PLATFORM_SYSTEM_FALLBACK_LIST && ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000)) 1297 result = adoptCF(CTFontCreatePhysicalFontForCharactersWithLanguage(font, characters, length, localeString.get(), &coveredLength)); 1298 #else 1299 result = adoptCF(CTFontCreateForCharactersWithLanguage(font, characters, length, localeString.get(), &coveredLength)); 1300 #endif 1296 1301 1297 1302 #if PLATFORM(IOS) -
trunk/Source/WebCore/platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp
r218614 r218616 29 29 #include "FontCache.h" 30 30 #include "FontSelector.h" 31 #include "SoftLinking.h" 31 32 #include <CoreText/CoreText.h> 33 34 #if USE_PLATFORM_SYSTEM_FALLBACK_LIST 35 SOFT_LINK_FRAMEWORK(CoreText); 36 SOFT_LINK_MAY_FAIL(CoreText, CTFontCopyPhysicalFont, CTFontRef, (CTFontRef font), (font)); 37 #endif 32 38 33 39 namespace WebCore { … … 48 54 auto font = adoptCF(CTFontCreateWithFontDescriptor(m_fontDescriptor.get(), size, nullptr)); 49 55 56 auto fontForSynthesisComputation = font; 57 #if USE_PLATFORM_SYSTEM_FALLBACK_LIST 58 if (canLoadCTFontCopyPhysicalFont()) { 59 if (auto physicalFont = adoptCF(CTFontCopyPhysicalFont(font.get()))) 60 fontForSynthesisComputation = physicalFont; 61 } 62 #endif 63 50 64 font = preparePlatformFont(font.get(), fontDescription, nullptr, nullptr, { }, fontDescription.computedSize()); 51 65 52 66 bool syntheticBold, syntheticOblique; 53 std::tie(syntheticBold, syntheticOblique) = computeNecessarySynthesis(font .get(), fontDescription).boldObliquePair();67 std::tie(syntheticBold, syntheticOblique) = computeNecessarySynthesis(fontForSynthesisComputation.get(), fontDescription).boldObliquePair(); 54 68 55 69 FontPlatformData fontPlatformData(font.get(), size, syntheticBold, syntheticOblique, fontDescription.orientation(), fontDescription.widthVariant(), fontDescription.textRenderingMode());
Note: See TracChangeset
for help on using the changeset viewer.