Edit

Share via


CTFontManager.UnregisterGraphicsFont(CGFont, NSError) Method

Definition

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);
}

Applies to