Documentation ¶
Overview ¶
Package opentype implements the font.Face interface based on SFNT font file formats.
Index ¶
- func NewFace(f *sfnt.Font, opts *FaceOptions) (font.Face, error)
- type Face
- func (f *Face) Close() error
- func (f *Face) Glyph(dot fixed.Point26_6, r rune) (dr image.Rectangle, mask image.Image, maskp image.Point, advance fixed.Int26_6, ...)
- func (f *Face) GlyphAdvance(r rune) (advance fixed.Int26_6, ok bool)
- func (f *Face) GlyphBounds(r rune) (bounds fixed.Rectangle26_6, advance fixed.Int26_6, ok bool)
- func (f *Face) Kern(r0, r1 rune) fixed.Int26_6
- func (f *Face) Metrics() font.Metrics
- type FaceOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Face ¶
type Face struct {
// contains filtered or unexported fields
}
Face implements the font.Face interface for sfnt.Font values.
func (*Face) Glyph ¶
func (f *Face) Glyph(dot fixed.Point26_6, r rune) (dr image.Rectangle, mask image.Image, maskp image.Point, advance fixed.Int26_6, ok bool)
Glyph satisfies the font.Face interface.
func (*Face) GlyphAdvance ¶
GlyphAdvance satisfies the font.Face interface.
func (*Face) GlyphBounds ¶
GlyphBounds satisfies the font.Face interface.
type FaceOptions ¶
type FaceOptions struct { Size float64 // Size is the font size in points DPI float64 // DPI is the dots per inch resolution Hinting font.Hinting // Hinting selects how to quantize a vector font's glyph nodes }
FaceOptions describes the possible options given to NewFace when creating a new font.Face from a sfnt.Font.
Click to show internal directories.
Click to hide internal directories.