Documentation ¶
Overview ¶
Package otf implements a parser for TrueType and OpenType fonts. Those formats are documented at http://developer.apple.com/fonts/TTRefMan/ and http://www.microsoft.com/typography/otspec/.
Index ¶
- type Font
- func (f *Font) CFF() []byte
- func (f *Font) HMetric(i Index) HMetric
- func (f *Font) Index(x rune) Index
- func (f *Font) Index2(x rune) Index
- func (f *Font) Kerning(scale int, a, b Index) int
- func (f *Font) Ligatures(glyphs []Index) []Index
- func (f *Font) NumGlyphs() int
- func (f *Font) Scale(value, scale int) int
- func (f *Font) SmallCaps(glyphs []Index) []Index
- func (f *Font) StringToGlyphs(text string) []Index
- func (f *Font) TTF() []byte
- type FontError
- type HMetric
- type Index
- type Kerner
- type Kerning
- type Ligature
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Font ¶
type Font struct { FullName string // full font name PostscriptName string // Postscript name UnitsPerEm int // scaling factor for (nearly) all values here XMin, XMax, YMin, YMax int // bounding box Ascender int // typographic ascender Descender int // typographic descender CapHeight int // height of an uppercase letter (from baseline) ItalicAngle float32 // italic angle // contains filtered or unexported fields }
func (*Font) StringToGlyphs ¶
type FontError ¶
type FontError string
FontError is used to report various errors about invalid TTF and OTF files.
Click to show internal directories.
Click to hide internal directories.