mirror of
https://gitee.com/csharpui/CPF.git
synced 2025-07-16 07:59:46 +08:00
41 lines
1.1 KiB
C#
41 lines
1.1 KiB
C#
using CPF.Mac.Foundation;
|
|
using CPF.Mac.ObjCRuntime;
|
|
using System;
|
|
|
|
namespace CPF.Mac.CoreText
|
|
{
|
|
[Since(3, 2)]
|
|
public static class CTFontVariationAxisKey
|
|
{
|
|
public static readonly NSString Identifier;
|
|
|
|
public static readonly NSString MinimumValue;
|
|
|
|
public static readonly NSString MaximumValue;
|
|
|
|
public static readonly NSString DefaultValue;
|
|
|
|
public static readonly NSString Name;
|
|
|
|
static CTFontVariationAxisKey()
|
|
{
|
|
IntPtr intPtr = Dlfcn.dlopen("/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreText.framework/CoreText", 0);
|
|
if (!(intPtr == IntPtr.Zero))
|
|
{
|
|
try
|
|
{
|
|
Identifier = Dlfcn.GetStringConstant(intPtr, "kCTFontVariationAxisIdentifierKey");
|
|
MinimumValue = Dlfcn.GetStringConstant(intPtr, "kCTFontVariationAxisMinimumValueKey");
|
|
MaximumValue = Dlfcn.GetStringConstant(intPtr, "kCTFontVariationAxisMaximumValueKey");
|
|
DefaultValue = Dlfcn.GetStringConstant(intPtr, "kCTFontVariationAxisDefaultValueKey");
|
|
Name = Dlfcn.GetStringConstant(intPtr, "kCTFontVariationAxisNameKey");
|
|
}
|
|
finally
|
|
{
|
|
Dlfcn.dlclose(intPtr);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|