emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 1850121629 2/2: Avoid deprecation warning in NS-specific code


From: Po Lu
Subject: Re: master 1850121629 2/2: Avoid deprecation warning in NS-specific code
Date: Mon, 07 Feb 2022 09:27:13 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)

Mattias EngdegÄrd <mattiase@acm.org> writes:

> diff --git a/src/macfont.m b/src/macfont.m
> index f623c3ca2f..34e48afb98 100644
> --- a/src/macfont.m
> +++ b/src/macfont.m
> @@ -3570,7 +3570,10 @@ mac_font_create_preferred_family_for_attributes 
> (CFDictionaryRef attributes)
>  
>        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
>              {

Speaking of this, has anyone tried to adapt macfont to Opal (the free
implementation of Core Graphics and Core Text)?

I don't know how complete it is, but presumably we could reuse a great
deal of the layout machinery from GNUstep's NSLayoutManager, so that
part is taken care of at least.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]