[CoreText] Adopt XAMCORE_4_0 changes in .NET. (#13943)

This commit is contained in:
Rolf Bjarne Kvinge 2022-01-28 17:27:20 +01:00 коммит произвёл GitHub
Родитель ba555b2fcc
Коммит 516fb91fac
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 3 добавлений и 9 удалений

Просмотреть файл

@ -60,14 +60,8 @@ namespace CoreText {
[UnsupportedOSPlatform ("maccatalyst")]
#endif
Session = 3,
#if !XAMCORE_4_0
#if !NET
[NoiOS][NoTV][NoWatch] // historically not available under the old name
#else
[UnsupportedOSPlatform ("tvos")]
[UnsupportedOSPlatform ("ios")]
[UnsupportedOSPlatform ("maccatalyst")]
#endif
User = Persistent,
#endif
}
@ -446,16 +440,16 @@ namespace CoreText {
return ret;
}
#if !NET
static CTFontManager ()
{
var handle = Libraries.CoreText.Handle;
#if !XAMCORE_3_0
ErrorDomain = Dlfcn.GetStringConstant (handle, "kCTFontManagerErrorDomain");
#endif
#if !XAMCORE_4_0
ErrorFontUrlsKey = Dlfcn.GetStringConstant (handle, "kCTFontManagerErrorFontURLsKey");
#endif
}
#endif // !NET
static NSString _RegisteredFontsChangedNotification;
@ -473,7 +467,7 @@ namespace CoreText {
#if !XAMCORE_3_0
public readonly static NSString ErrorDomain;
#endif
#if !XAMCORE_4_0
#if !NET
[Obsolete ("Use the 'CTFontManagerErrorKeys.FontUrlsKey' property instead.")]
public readonly static NSString ErrorFontUrlsKey;
#endif