Bug 144151

Summary: [iOS] Reimplement r182512 and r183153 in a cleaner way
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: New BugsAssignee: Myles C. Maxfield <mmaxfield>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch enrica: review+

Description Myles C. Maxfield 2015-04-24 10:41:29 PDT
Reimplement r182512 and r183153 in a cleaner way
Comment 1 Myles C. Maxfield 2015-04-24 10:51:11 PDT
Created attachment 251559 [details]
Patch
Comment 2 Enrica Casucci 2015-04-24 10:58:53 PDT
Comment on attachment 251559 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=251559&action=review

> Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm:-272
> -#endif // !PLATFORM(IOS)

Where did all the logic for cascadeToLastResortAndDisableSwashesFontDescriptor go? Are you sure this code is equivalent on iOS?
Comment 3 Myles C. Maxfield 2015-04-24 11:06:58 PDT
Comment on attachment 251559 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=251559&action=review

>> Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm:-272
>> -#endif // !PLATFORM(IOS)
> 
> Where did all the logic for cascadeToLastResortAndDisableSwashesFontDescriptor go? Are you sure this code is equivalent on iOS?

It's above, see line 265.

The logic between the two code paths is exactly the same; the only difference is which underlying creation API we call. On OS X, we call CTFontCreateCopyWithAttributes() if we can, and CTFontCreateWithGraphicsFont() otherwise. Before this patch, on iOS, we would just always call CTFontCreateWithGraphicsFont (which has the problematic quality of losing system-font-ness). So the logic is the same, we're just switching to a different (and superior) API call.
Comment 4 Myles C. Maxfield 2015-04-24 11:46:23 PDT
Committed r183271: <http://trac.webkit.org/changeset/183271>