CTFontManager.UnregisterGraphicsFont(CGFont, NSError) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Unregisters a CoreGraphics Font from the CoreText font system.
public static bool UnregisterGraphicsFont (CoreGraphics.CGFont font, out Foundation.NSError error);
static member UnregisterGraphicsFont : CoreGraphics.CGFont * -> bool
Parameters
- font
- CGFont
The CoreGraphics font to unregister with the CoreText font system.
- error
- NSError
On return the error, if any.
Returns
True on success, false on error.
Remarks
//
// 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);
}