Skip to content

API reference / Common / GoogleFontFamily

Interface: GoogleFontFamily ​

One family from the host's Google font catalog, in the shape the Google Fonts Developer API returns it.

There is no compiled-in family list: JS supplies this — live from the API, or from a snapshot it ships. That follows the vendor split all the way down. JS already owns the css2 protocol; owning the catalog too means nothing here carries a generated table that goes stale, and the host can narrow the list, extend it or refresh it without a Rust release. An empty catalog is Google disabled, so there is no flag to keep consistent with a list.

Properties ​

PropertyDescription
name
string
The family name, e.g. "Roboto".
variants
[boolean, boolean][]
The (bold, italic) faces the API serves for it.
subsets
string[]
The subset names it offers, e.g. "latin", "greek". Not a fetch list — the host's fulfiller picks what to download from the live unicode-ranges. This is the script prefilter's input, and deciding whether a round trip is worth making is the only thing done with it here.