CTFontManager.UnregisterGraphicsFont(CGFont, NSError) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
从 CoreText 字体系统取消注册 CoreGraphics 字体。
public static bool UnregisterGraphicsFont (CoreGraphics.CGFont font, out Foundation.NSError error);
static member UnregisterGraphicsFont : CoreGraphics.CGFont * -> bool
参数
- font
- CGFont
要注销的 CoreGraphics 字体与 CoreText 字体系统。
- error
- NSError
返回错误(如果有)。
返回
成功时为 True,错误时为 false。
注解
//
// Load font into byte array from a file.
//
byte [] myBuffer = GetEmbeddedResource ("myResource");
CGFont font = CGFont.CreateFromProvider (new CGDataProvider (myBuffer, 0, myBuffer.Count));
if (CTFontManager.RegisterGraphicsFont (font, out error)){
//
// access font
//
// Release font after we use it.
CTFontManager.UnregisterGraphicsFont (font, out error);
}