Avoid deprecation warning in NS-specific code
* src/macfont.m (mac_font_create_preferred_family_for_attributes): CTGetCoreTextVersion is obsolete and its use elicits a warning in macOS 11.6; use NSProcessInfo instead.
This commit is contained in:
parent
ead36d8d36
commit
1850121629
1 changed files with 4 additions and 1 deletions
|
@ -3570,7 +3570,10 @@ So we use CTFontDescriptorCreateMatchingFontDescriptor (no
|
|||
|
||||
if (languages && CFArrayGetCount (languages) > 0)
|
||||
{
|
||||
if (CTGetCoreTextVersion () >= kCTVersionNumber10_9)
|
||||
if ([[NSProcessInfo processInfo]
|
||||
isOperatingSystemAtLeastVersion:
|
||||
((NSOperatingSystemVersion){
|
||||
.majorVersion = 10, .minorVersion = 9})])
|
||||
values[num_values++] = CFArrayGetValueAtIndex (languages, 0);
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue