Documentation ¶
Overview ¶
Package afm provides a parser for Adobe Font Metrics (AFM) files.
The AFM file format is documented in Adobe technical note #5004, "Adobe Font Metrics File Format Specification".
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KernPair ¶ added in v0.4.0
type KernPair struct {
Left, Right string
Adjust funit.Int16 // negative = move glyphs closer together
}
KernPair represents a kerning pair.
type Metrics ¶ added in v0.4.1
type Metrics struct { Glyphs map[string]*GlyphInfo Encoding []string // PostScript language name (FontName or CIDFontName) of the font. FontName string // FullName is a unique, human-readable name for an individual font. FullName string CapHeight float64 XHeight float64 Ascent float64 Descent float64 // negative // UnderlinePosition is the recommended distance from the baseline for // positioning underlining strokes. This number is the y coordinate (in the // glyph coordinate system) of the center of the stroke. UnderlinePosition float64 // UnderlineThickness is the recommended stroke width for underlining, in // units of the glyph coordinate system. UnderlineThickness float64 // ItalicAngle is the angle, in degrees counterclockwise from the vertical, // of the dominant vertical strokes of the font. ItalicAngle float64 // IsFixedPitch is a flag indicating whether the font is a fixed-pitch // (monospaced) font. IsFixedPitch bool Kern []*KernPair }
Metrics contains the information from an AFM file.
Click to show internal directories.
Click to hide internal directories.