package cff

Import Path
	github.com/go-text/typesetting/font/cff (on go.dev)

Dependency Relation
	imports 6 packages, and imported by one package


Package-Level Type Names (total 2)
/* sort by: | */
CFF represents a parsed CFF font, as found in the 'CFF ' Opentype table. Charstrings contains the actual glyph definition. It has a length of numGlyphs and is indexed by glyph ID. See `LoadGlyph` for a way to intepret the glyph data. GlyphName returns the name of the glyph or an empty string if not found. LoadGlyph parses the glyph charstring to compute segments and path bounds. It returns an error if the glyph is invalid or if decoding the charstring fails. func Parse(file []byte) (*CFF, error)
CFF2 represents a parsed 'CFF2' Opentype table. Charstrings contains the actual glyph definition. It has a length of numGlyphs and is indexed by glyph ID. See `LoadGlyph` for a way to intepret the glyph data. // optional LoadGlyph parses the glyph charstring to compute segments and path bounds. It returns an error if the glyph is invalid or if decoding the charstring fails. [coords] must either have the same length as the variations axis, or be empty, and be normalized func ParseCFF2(src []byte) (*CFF2, error)
Package-Level Functions (total 2)
Parse parses a .cff font file. Although CFF enables multiple font or CIDFont programs to be bundled together in a single file, embedded CFF font file in PDF or in TrueType/OpenType fonts shall consist of exactly one font or CIDFont. Thus, this function returns an error if the file contains more than one font.
ParseCFF2 parses 'src', which must be the content of a 'CFF2' Opentype table. See also https://learn.microsoft.com/en-us/typography/opentype/spec/cff2