What is unifont?
mainunifont is an open-source JavaScript library designed to provide a unified interface for reading font metadata from various font CDNs. Instead of dealing with the different response formats of Google Fonts (stylesheets), Fontshare (JSON), Fontsource (npm), or Adobe (Typekit IDs), you can use unifont to request a font family and receive a standardized response containing weights, styles, subsets, unicode ranges, and @font-face data.
Key Characteristics:
- Small footprint: It only reads metadata; it does not download font files, perform subsetting, manage build pipelines, or handle caching.
- Standardized Output: Regardless of the provider, the metadata shape remains consistent.
- Usage: It is ideal for scripts, editor plugins, and CI checks. For automated font downloading and self-hosting in Nuxt or Vite apps, consider using
@nuxt/fontsorfontlessinstead.