MonobjcMonobjc Documented Class Library
ConvertFontToSize Method (aFont, size)
NamespacesMonobjc.AppKitNSFontManagerConvertFontToSize(NSFont, CGFloat)

Returns an NSFont object whose traits are the same as those of the given font, except for the size, which is changed to the given size.

Original signature is '- (NSFont *)convertFont:(NSFont *)aFont toSize:(CGFloat)size'

Available in Mac OS X v10.0 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual NSFont ConvertFontToSize(
	NSFont aFont,
	CGFloat size
)
Public Overridable Function ConvertFontToSize ( _
	aFont As NSFont, _
	size As CGFloat _
) As NSFont
public:
virtual NSFont^ ConvertFontToSize(
	NSFont^ aFont, 
	CGFloat size
)
Parameters
aFont (NSFont)
The font whose traits are matched.
size (CGFloat)
The new font size.
Return Value
A font with matching traits except in the new size, or aFont if it can’t be converted.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.AppKit (Module: Monobjc.AppKit)