Mac Guides | Samples

MonoMac.CoreText.CTFont Class

Represents a CoreText Font.

See Also: CTFont

Syntax

[MonoMac.ObjCRuntime.Since(3, 2)]
public class CTFont : INativeObject, IDisposable

Remarks

CoreText does not synthesize font styles (italic and bold). This means that if you pick a font that has neither a Bolded or Italicized versions available, CoreText will not create a dynamic font that is merely a slanted version of the font for italic, or a boldened version from the original font. In those cases, if you want to synthesize the font, you could apply a Matrix transformation to slant the font (it will still be wrong, but will look slanted). For bolding, you could stroke the font twice, or manually extend the glyph path.

Related content

Requirements

Namespace: MonoMac.CoreText
Assembly: XamMac (in XamMac.dll)
Assembly Versions: 0.0.0.0

The members of MonoMac.CoreText.CTFont are listed below.

See Also: Object

Public Constructors

Public Properties

[read-only]
AscentMetricSingle.
[read-only]
BoundingBoxRectangleF.
[read-only]
CapHeightMetricSingle.
[read-only]
CharacterSetNSCharacterSet.
[read-only]
DescentMetricSingle.
[read-only]
DisplayNameString.
[read-only]
FamilyNameString.
[read-only]
FullNameString.
[read-only]
GlyphCountInt32.
[read-only]
HandleIntPtr. Handle (pointer) to the unmanaged object representation.
[read-only]
LeadingMetricSingle.
[read-only]
MatrixCGAffineTransform. The transformation matrix used when this font was created.
[read-only]
PostScriptNameString.
[read-only]
SizeSingle. The font size.
[read-only]
SlantAngleSingle.
[read-only]
StringEncodingUInt32.
[read-only]
SymbolicTraitsCTFontSymbolicTraits.
[read-only]
UnderlinePositionSingle.
[read-only]
UnderlineThicknessSingle.
[read-only]
UnitsPerEmMetricUInt32.
[read-only]
XHeightMetricSingle.

Public Methods

Dispose()
Releases the resourced used by the CTFont object.
DrawGlyphs(CGContext, UInt16[], PointF[])
Finalize()
Finalizer for the CTFont object
ForString(String, NSRange) : CTFont
GetAdvancesForGlyphs(CTFontOrientation, UInt16[]) : Double
GetAdvancesForGlyphs(CTFontOrientation, UInt16[], SizeF[], Int32) : Double
GetAttribute(NSString) : NSObject
GetAvailableTables(CTFontTableOptions) : CTFontTable[]
GetBoundingRects(CTFontOrientation, UInt16[]) : RectangleF
GetBoundingRects(CTFontOrientation, UInt16[], RectangleF[], Int32) : RectangleF
GetDefaultCascadeList(String[]) : CTFontDescriptor[]
GetFeatures() : CTFontFeatures[]
GetFeatureSettings() : CTFontFeatureSettings[]
GetFontDescriptor() : CTFontDescriptor
GetFontTableData(CTFontTable, CTFontTableOptions) : NSData
GetGlyphsForCharacters(Char[], UInt16[]) : Boolean
GetGlyphsForCharacters(Char[], UInt16[], Int32) : Boolean
GetGlyphWithName(String) : UInt16
GetLigatureCaretPositions(UInt16, Single[]) : Int32
GetLocalizedName(CTFontNameKey) : String
GetName(CTFontNameKey) : String
GetOpticalBounds(UInt16[], RectangleF[], Int32, CTFontOptions) : RectangleF
GetPathForGlyph(UInt16) : CGPath
GetPathForGlyph(UInt16, ref CGAffineTransform) : CGPath
GetSupportedLanguages() : String[]
GetTraits() : CTFontTraits
static
GetTypeID() : Int32
GetVariation() : CTFontVariation
GetVariationAxes() : CTFontVariationAxes[]
GetVerticalTranslationsForGlyphs(UInt16[], SizeF[], Int32)
ToCGFont() : CGFont
ToCGFont(CTFontDescriptor) : CGFont
override
ToString() : String
WithAttributes(Single, CTFontDescriptor) : CTFont
WithAttributes(Single, CTFontDescriptor, ref CGAffineTransform) : CTFont
WithFamily(Single, String) : CTFont
WithFamily(Single, String, ref CGAffineTransform) : CTFont
WithSymbolicTraits(Single, CTFontSymbolicTraits, CTFontSymbolicTraits) : CTFont
WithSymbolicTraits(Single, CTFontSymbolicTraits, CTFontSymbolicTraits, ref CGAffineTransform) : CTFont

Protected Methods

Dispose(Boolean)
Releases the resourced used by the CTFont object.