Changeset 185842 in webkit
- Timestamp:
- Jun 22, 2015, 1:53:26 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r185838 r185842 1 2015-06-22 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [iOS] Arabic text styled with Georgia is rendered as boxes 4 https://bugs.webkit.org/show_bug.cgi?id=145681 5 <rdar://problem/21169844> 6 7 Reviewed by Darin Adler. 8 9 * fast/text/arabic-times-new-roman.html: Added. 10 * platform/ios-simulator/fast/text/arabic-times-new-roman-expected.txt: Added. 11 * platform/ios-simulator/fast/text/arabic-times-new-roman-expected.png: Added. 12 * platform/mac-mavericks/fast/text/arabic-times-new-roman-expected.txt: Added. 13 * platform/mac/fast/text/arabic-times-new-roman-expected.txt: Added. 14 * platform/mac/fast/text/arabic-times-new-roman-expected.png: Added. 15 1 16 2015-06-22 Zalan Bujtas <zalan@apple.com> 2 17 -
trunk/Source/WebCore/ChangeLog
r185841 r185842 1 2015-06-22 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [iOS] Arabic text styled with Georgia is rendered as boxes 4 https://bugs.webkit.org/show_bug.cgi?id=145681 5 <rdar://problem/21169844> 6 7 Reviewed by Darin Adler. 8 9 Georgia doesn't support Arabic, so we ask CoreText what font does support Arabic. It returns 10 TimesNewRomanPSMT. However, WebKit explicitly disallows this font on iOS. Therefore, instead 11 of using TimesNewRomanPSMT, we will simply just use GeezaPro. 12 13 Test: fast/text/arabic-times-new-roman.html 14 15 * platform/graphics/ios/FontCacheIOS.mm: 16 (WebCore::FontCache::systemFallbackForCharacters): 17 * platform/graphics/Font.h: Let FontCacheIOS call fontFamilyShouldNotBeUsedForArabic() 18 * platform/graphics/cocoa/FontCocoa.mm: 19 (WebCore::fontFamilyShouldNotBeUsedForArabic): 20 1 21 2015-06-22 Alex Christensen <achristensen@webkit.org> 2 22 -
trunk/Source/WebCore/platform/graphics/Font.h
r183153 r185842 323 323 }; 324 324 325 #if PLATFORM(IOS) 326 bool fontFamilyShouldNotBeUsedForArabic(CFStringRef); 327 #endif 328 325 329 ALWAYS_INLINE FloatRect Font::boundsForGlyph(Glyph glyph) const 326 330 { -
trunk/Source/WebCore/platform/graphics/cocoa/FontCocoa.mm
r185632 r185842 80 80 } 81 81 #else 82 staticbool fontFamilyShouldNotBeUsedForArabic(CFStringRef fontFamilyName)82 bool fontFamilyShouldNotBeUsedForArabic(CFStringRef fontFamilyName) 83 83 { 84 84 if (!fontFamilyName) -
trunk/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm
r185205 r185842 447 447 #else 448 448 RetainPtr<CTFontDescriptorRef> fallbackFontDescriptor = adoptCF(CTFontCreatePhysicalFontDescriptorForCharactersWithLanguage(originalFontData->getCTFont(), characters, length, nullptr, nullptr)); 449 if (RetainPtr<CFStringRef> foundFontName = adoptCF(static_cast<CFStringRef>(CTFontDescriptorCopyAttribute(fallbackFontDescriptor.get(), kCTFontNameAttribute)))) 449 if (auto foundFontName = adoptCF(static_cast<CFStringRef>(CTFontDescriptorCopyAttribute(fallbackFontDescriptor.get(), kCTFontNameAttribute)))) { 450 if (c >= 0x0600 && c <= 0x06ff) { // Arabic 451 auto familyName = adoptCF(static_cast<CFStringRef>(CTFontDescriptorCopyAttribute(fallbackFontDescriptor.get(), kCTFontFamilyNameAttribute))); 452 if (fontFamilyShouldNotBeUsedForArabic(familyName.get())) 453 foundFontName = isFontWeightBold(description.weight()) ? CFSTR("GeezaPro-Bold") : CFSTR("GeezaPro"); 454 } 450 455 font = fontForFamily(description, foundFontName.get(), false); 456 } 451 457 #endif 452 458
Note:
See TracChangeset
for help on using the changeset viewer.