Documentation ¶
Index ¶
- type FontRef
- func (f FontRef) CopyDisplayName() CF.StringRef
- func (f FontRef) CopyFamilyName() CF.StringRef
- func (f FontRef) CopyFullName() CF.StringRef
- func (f FontRef) CopyPostScriptName() CF.StringRef
- func (f FontRef) GetAscent() CG.Float
- func (f FontRef) GetDescent() CG.Float
- func (f FontRef) GetLeading() CG.Float
- func (f FontRef) GlyphAdvance(char rune) CG.Float
- func (f FontRef) GlyphBounds(char rune) (advance CG.Float, bounds CG.Rect)
- func (f FontRef) GlyphDraw(char rune, origin CG.Point, alpha *image.Alpha) bool
- func (f FontRef) Kern(char0 rune, char1 rune) CG.Float
- func (f FontRef) Release()
- func (f FontRef) Retain()
- func (f FontRef) String() string
- type FontSymbolicTraits
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FontRef ¶
The FontRef type is an untyped reference to a Core Text font object.
func FontCreateCopyWithSymbolicTraits ¶
func FontCreateCopyWithSymbolicTraits(font FontRef, size CG.Float, transform *CG.AffineTransform, traits FontSymbolicTraits, mask FontSymbolicTraits) FontRef
FontCreateCopyWithSymbolicTraits makes a copy of an existing font object but allows the program to change the affine transformation or the style attributes of the font on the copy.
func FontCreateWithName ¶
FontCreateWithName creates a new font object from a name, size and optional affine transformation.
func (FontRef) CopyDisplayName ¶
FontCopyDisplayName returns a copy of the font's display name.
func (FontRef) CopyFamilyName ¶
FontCopyFamilyName returns a copy of the font's family name.
func (FontRef) CopyFullName ¶
FontCopyFullName returns a copy of the font's full name.
func (FontRef) CopyPostScriptName ¶
FontCopyPostScriptName returns a copy of the font's post-script name.
func (FontRef) GetDescent ¶
FontGetDescent returns the descent value of the font passed as argument.
func (FontRef) GetLeading ¶
FontGetLeading returns the leading value of the font passed as argument.
func (FontRef) GlyphAdvance ¶
FontGlyphAdvance returns the 'advance' of the glyph representing the rune given as second argument.
func (FontRef) GlyphBounds ¶
FontGlyphBounds returns the 'advance' and 'bounds' of the glyph representing the rune given as second argument.
func (FontRef) GlyphDraw ¶
FontGlyphDraw draws the font glyph representing the rune given as second argument into the alpha image at the specified position. The function returns true if the rune could be drawn, false otherwise, which measn the font had no representation of the rune.
func (FontRef) Kern ¶
FontKern returns the ideal spacing to leave between the two characters passed as argument.
func (FontRef) Release ¶
func (f FontRef) Release()
Release decreases the reference counter of the Core Text font passed as argument.
type FontSymbolicTraits ¶
type FontSymbolicTraits int
FontSymbolicTraits is an enumeration representing the style attributes of a font.
const ( FontItalicTrait FontSymbolicTraits = FontSymbolicTraits(C.kCTFontItalicTrait) FontBoldTrait FontSymbolicTraits = FontSymbolicTraits(C.kCTFontItalicTrait) FontExpandedTrait FontSymbolicTraits = FontSymbolicTraits(C.kCTFontItalicTrait) FontCondensedTrait FontSymbolicTraits = FontSymbolicTraits(C.kCTFontCondensedTrait) FontMonoSpaceTrait FontSymbolicTraits = FontSymbolicTraits(C.kCTFontCondensedTrait) FontVerticalTrait FontSymbolicTraits = FontSymbolicTraits(C.kCTFontVerticalTrait) FontUIOptimizedTrait FontSymbolicTraits = FontSymbolicTraits(C.kCTFontUIOptimizedTrait) FontClassMaskTrait FontSymbolicTraits = FontSymbolicTraits(C.kCTFontClassMaskTrait) )
These constants are all the possible values of the FontSymbolicTraits enumeration.