CTFont Class

Definition

Represents a CoreText Font.

public class CTFont : IDisposable, ObjCRuntime.INativeObject
type CTFont = class
    interface INativeObject
    interface IDisposable
Inheritance
CTFont
Implements

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.

Constructors

CTFont(CGFont, nfloat, CGAffineTransform)
CTFont(CGFont, nfloat, CGAffineTransform, CTFontDescriptor)
CTFont(CGFont, nfloat, CTFontDescriptor)
CTFont(CTFontDescriptor, nfloat)
CTFont(CTFontDescriptor, nfloat, CGAffineTransform)
CTFont(CTFontDescriptor, nfloat, CTFontOptions)
CTFont(CTFontDescriptor, nfloat, CTFontOptions, CGAffineTransform)
CTFont(CTFontUIFontType, nfloat, String)
CTFont(String, nfloat)
CTFont(String, nfloat, CGAffineTransform)
CTFont(String, nfloat, CGAffineTransform, CTFontOptions)
CTFont(String, nfloat, CTFontOptions)

Properties

AscentMetric
BoundingBox
CapHeightMetric
CharacterSet
DescentMetric
DisplayName
FamilyName
FullName
GlyphCount
Handle

Handle (pointer) to the unmanaged object representation.

LeadingMetric
Matrix

The transformation matrix used when this font was created.

PostScriptName
Size

The font size.

SlantAngle
StringEncoding
SymbolicTraits
UnderlinePosition
UnderlineThickness
UnitsPerEmMetric
XHeightMetric

Methods

Dispose()

Releases the resources used by the CTFont object.

Dispose(Boolean)

Releases the resources used by the CTFont object.

DrawGlyphs(CGContext, UInt16[], CGPoint[])
Finalize()

Finalizer for the CTFont object

ForString(String, NSRange)
GetAdvancesForGlyphs(CTFontOrientation, UInt16[])
GetAdvancesForGlyphs(CTFontOrientation, UInt16[], CGSize[], nint)
GetAttribute(NSString)
GetAvailableTables(CTFontTableOptions)
GetBoundingRects(CTFontOrientation, UInt16[])
GetBoundingRects(CTFontOrientation, UInt16[], CGRect[], nint)
GetDefaultCascadeList(String[])
GetFeatures()
GetFeatureSettings()
GetFontDescriptor()
GetFontTableData(CTFontTable, CTFontTableOptions)
GetGlyphsForCharacters(Char[], UInt16[])
GetGlyphsForCharacters(Char[], UInt16[], nint)
GetGlyphWithName(String)
GetLigatureCaretPositions(UInt16, nfloat[])
GetLocalizedName(CTFontNameKey)
GetLocalizedName(CTFontNameKey, String)
GetName(CTFontNameKey)
GetOpticalBounds(UInt16[], CGRect[], nint, CTFontOptions)
GetPathForGlyph(UInt16)
GetPathForGlyph(UInt16, CGAffineTransform)
GetSupportedLanguages()
GetTraits()
GetTypeID()

Type identifier for the CoreText.CTFont type.

GetVariation()
GetVariationAxes()
GetVerticalTranslationsForGlyphs(UInt16[], CGSize[], nint)
ToCGFont()
ToCGFont(CTFontDescriptor)
ToString()
WithAttributes(nfloat, CTFontDescriptor)
WithAttributes(nfloat, CTFontDescriptor, CGAffineTransform)
WithFamily(nfloat, String)
WithFamily(nfloat, String, CGAffineTransform)
WithSymbolicTraits(nfloat, CTFontSymbolicTraits, CTFontSymbolicTraits)
WithSymbolicTraits(nfloat, CTFontSymbolicTraits, CTFontSymbolicTraits, CGAffineTransform)

Applies to

See also