Edytuj

Udostępnij za pośrednictwem


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, CTFontDescriptor)
CTFont(CGFont, nfloat, CGAffineTransform)
CTFont(CGFont, nfloat, CTFontDescriptor)
CTFont(CTFontDescriptor, nfloat, CGAffineTransform)
CTFont(CTFontDescriptor, nfloat, CTFontOptions, CGAffineTransform)
CTFont(CTFontDescriptor, nfloat, CTFontOptions)
CTFont(CTFontDescriptor, nfloat)
CTFont(CTFontUIFontType, nfloat, String)
CTFont(String, nfloat, CGAffineTransform, CTFontOptions)
CTFont(String, nfloat, CGAffineTransform)
CTFont(String, nfloat, CTFontOptions)
CTFont(String, nfloat)

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[], CGSize[], nint)
GetAdvancesForGlyphs(CTFontOrientation, UInt16[])
GetAttribute(NSString)
GetAvailableTables(CTFontTableOptions)
GetBoundingRects(CTFontOrientation, UInt16[], CGRect[], nint)
GetBoundingRects(CTFontOrientation, UInt16[])
GetDefaultCascadeList(String[])
GetFeatures()
GetFeatureSettings()
GetFontDescriptor()
GetFontTableData(CTFontTable, CTFontTableOptions)
GetGlyphsForCharacters(Char[], UInt16[], nint)
GetGlyphsForCharacters(Char[], UInt16[])
GetGlyphWithName(String)
GetLigatureCaretPositions(UInt16, nfloat[])
GetLocalizedName(CTFontNameKey, String)
GetLocalizedName(CTFontNameKey)
GetName(CTFontNameKey)
GetOpticalBounds(UInt16[], CGRect[], nint, CTFontOptions)
GetPathForGlyph(UInt16, CGAffineTransform)
GetPathForGlyph(UInt16)
GetSupportedLanguages()
GetTraits()
GetTypeID()

Type identifier for the CoreText.CTFont type.

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

Applies to

See also