Documentation
¶
Overview ¶
Package fontcheck inspects font containers and CSS without loading glyphs, decompressing font payloads, executing code, or accessing the network.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Kind ¶
Kind sniffs only the signature, independently of filename/MIME hints. It does not promise the container, compressed payload or font is valid.
func MatchesFormat ¶
func ValidUnicodeRange ¶
ValidUnicodeRange checks the descriptor's mechanical bounds, not glyph coverage or whether the page's future/dynamic text fits a subset.
Types ¶
type Face ¶
type Info ¶
type Info struct {
Source string `json:"source"`
Format string `json:"format,omitempty"`
Bytes int `json:"bytes"`
SFNTBytes uint32 `json:"declaredSFNTBytes,omitempty"`
Variable bool `json:"hasVariationTable,omitempty"`
Collection bool `json:"collection,omitempty"`
Issue string `json:"issue,omitempty"`
Unknown string `json:"unknown,omitempty"`
}
type Stylesheet ¶
type Stylesheet struct {
Faces []Face
FamilyDefaults map[string]bool // a valid display policy may apply; no cascade claim
}
func ReadCSS ¶
func ReadCSS(raw []byte) (Stylesheet, error)
ReadCSS reads the font faces of a stylesheet with the shared CSS grammar/tokenizer. It observes every src declaration (fallback declarations can intentionally target different browser support), preserving order and nested media/supports/layer conditions. It never purges.