Bug 230248

Summary: [Cocoa] Migrate to CTFontHasTable() from CTFontCopyAvailableTables()
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: New BugsAssignee: Myles C. Maxfield <mmaxfield>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, benjamin, cdumez, cmarcelo, ews-watchlist, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 215688    
Bug Blocks:    
Attachments:
Description Flags
Patch andersca: review+

Description Myles C. Maxfield 2021-09-14 01:24:09 PDT
[Cocoa] Migrate to CTFontHasTable() from CTFontCopyAvailableTables()
Comment 1 Myles C. Maxfield 2021-09-14 01:25:09 PDT
Created attachment 438112 [details]
Patch
Comment 2 Anders Carlsson 2021-09-14 07:39:33 PDT
Comment on attachment 438112 [details]
Patch

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

> Source/WTF/wtf/PlatformUse.h:322
> +#define USE_CTFONTHASTABLE 1

I'd write this out as USE_CT_FONT_HAS_TABLE - but maybe that's just me!
Comment 3 Myles C. Maxfield 2021-09-14 11:33:58 PDT
Comment on attachment 438112 [details]
Patch

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

>> Source/WTF/wtf/PlatformUse.h:322
>> +#define USE_CTFONTHASTABLE 1
> 
> I'd write this out as USE_CT_FONT_HAS_TABLE - but maybe that's just me!

Yeah I originally did this the first time this kind of thing came up, but someone (I forget who) told me not to. Since then, we have USE_CTFONTSHAPEGLYPHS and USE_CTFONTSHAPEGLYPHS_WORKAROUND, so it seems maybe better to follow the established pattern.
Comment 4 Myles C. Maxfield 2021-09-14 11:39:49 PDT
Comment on attachment 438112 [details]
Patch

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

>>> Source/WTF/wtf/PlatformUse.h:322
>>> +#define USE_CTFONTHASTABLE 1
>> 
>> I'd write this out as USE_CT_FONT_HAS_TABLE - but maybe that's just me!
> 
> Yeah I originally did this the first time this kind of thing came up, but someone (I forget who) told me not to. Since then, we have USE_CTFONTSHAPEGLYPHS and USE_CTFONTSHAPEGLYPHS_WORKAROUND, so it seems maybe better to follow the established pattern.

HAVE_CTFONTCREATEFORCHARACTERSWITHLANGUAGEANDOPTION, HAVE_CTFONTISSYSTEMUIFONT, HAVE_CTFONTGETPHYSICALSYMBOLICTRAITS, and USE_CTFONTGETADVANCES_WORKAROUND too.
Comment 5 Myles C. Maxfield 2021-09-14 11:42:24 PDT
Committed r282398 (241659@main): <https://commits.webkit.org/241659@main>
Comment 6 Radar WebKit Bug Importer 2021-09-14 11:43:24 PDT
<rdar://problem/83110084>