Documentation
¶
Overview ¶
Package webfont converts a font in WOFF, WOFF2 or EOT into an sfnt file, the format of a TrueType or OpenType font file (D45). It is public, so that ivy and other programs can read fonts in a web format (D51). It ports no upstream. It follows the WOFF 1.0 and WOFF2 recommendations of the W3C and the EOT submission to the W3C.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Format ¶
type Format int
Format is the format of font data.
const ( // FormatUnknown is data in no format of this list. FormatUnknown Format = iota // FormatSFNT is a TrueType or OpenType font, or a collection of them. FormatSFNT // FormatWOFF is a font in WOFF 1.0. FormatWOFF // FormatWOFF2 is a font or a collection in WOFF2. FormatWOFF2 // FormatEOT is a font in EOT. FormatEOT )
The formats of font data.
func DetectFormat ¶
DetectFormat returns the format of data, from its first bytes.