mirror of
https://gitee.com/csharpui/CPF.git
synced 2026-09-03 00:26:27 +08:00
初始化
This commit is contained in:
28
CPF.Mac/Mac/CoreText/CTFontCollectionOptionKey.cs
Normal file
28
CPF.Mac/Mac/CoreText/CTFontCollectionOptionKey.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using CPF.Mac.Foundation;
|
||||
using CPF.Mac.ObjCRuntime;
|
||||
using System;
|
||||
|
||||
namespace CPF.Mac.CoreText
|
||||
{
|
||||
[Since(3, 2)]
|
||||
public static class CTFontCollectionOptionKey
|
||||
{
|
||||
public static readonly NSString RemoveDuplicates;
|
||||
|
||||
static CTFontCollectionOptionKey()
|
||||
{
|
||||
IntPtr intPtr = Dlfcn.dlopen("/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreText.framework/CoreText", 0);
|
||||
if (!(intPtr == IntPtr.Zero))
|
||||
{
|
||||
try
|
||||
{
|
||||
RemoveDuplicates = Dlfcn.GetStringConstant(intPtr, "kCTFontCollectionRemoveDuplicatesOption");
|
||||
}
|
||||
finally
|
||||
{
|
||||
Dlfcn.dlclose(intPtr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user