Font
2,071 Google fonts and unlimited local fonts. The FontOptions type configures a font's loading behavior.
Import
google
import { Inter, Roboto_Mono } from "swift-rust/font/google";local
import { localFont } from "swift-rust/font/local";FontOptions
| Option | Type | Default |
|---|---|---|
subsets | FontSubset[] | ["latin"] |
display | FontDisplay | "swap" |
weight | FontWeight | FontWeight[] | [400] |
style | FontStyle | FontStyle[] | ["normal"] |
variable | boolean | false |
preload | boolean | true |
adjustFontFallback | boolean | true |
Example
usage
const inter = Inter({
subsets: ["latin", "latin-ext"],
weight: ["400", "500", "700"],
style: ["normal", "italic"],
display: "swap",
variable: true,
preload: true,
});Browse all 2,071 fonts
See the live font preview for the full list.