@molecule/app-fonts-inter
Provider bond · fonts · App (browser) · v1.0.7 · Apache-2.0
Modern sans-serif designed for computer screens (local fonts)
npm install @molecule/app-fonts-internpm · Source on GitHub · Implements @molecule/app-fonts
How it works
@molecule/app-fonts-inter is a provider bond on the app (browser) side: it implements the fonts core interface (@molecule/app-fonts) with a concrete vendor or library behind it.
Your code calls the core; you wire this provider once at startup. Swapping vendors later is one line in that wiring, not a rewrite.
import { setFont } from '@molecule/app-fonts'
import { font } from '@molecule/app-fonts-inter'
setFont(font) // once, at app startup — before first paintWorks with: @molecule/app-fonts
Reference
Inter font bond for molecule.dev — a modern sans-serif designed for screens.
Exports a ready-made FontDefinition (font, role sans) with
locally-served WOFF2 faces (regular 400, bold 700, variable 100-900).
Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit
src/index.tsJSDoc, not this file.
Quick Start
import { setFont } from '@molecule/app-fonts'
import { font } from '@molecule/app-fonts-inter'
setFont(font) // once, at app startup — before first paint
Type
provider
Installation
npm install @molecule/app-fonts-inter @molecule/app-fonts
API
Constants
font
Inter font definition — modern sans-serif designed for screens.
const font: FontDefinition
Core Interface
Implements @molecule/app-fonts interface.
Injection Notes
Requirements
Peer dependencies:
@molecule/app-fonts^1.2.0
Runtime Dependencies
-
@molecule/app-fonts -
Wire with
setFont()from@molecule/app-fonts, never a rawbond('font', …)—setFont()is what sets the--mol-font-sansCSS variable and injects the@font-facerules; a raw bond registers the definition but renders nothing. -
Fills the
sansrole only —serif/monostay on system stacks unless another font bond is wired. Consume viavar(--mol-font-sans), never a hardcodedfont-family. -
Browser wiring: import
fontfrom this package and callsetFont(font)at startup. The packaged faces resolve relative to this module; the browser bundler emits the complete files as fingerprinted assets, including its configured public base path. No manual copy or app-side asset import is needed. -
Text faces ship a Latin subset and a full WOFF2 face for other characters.
-
The registry retains filenames for
mlclstatic font copying. A custom face may still use a plain filename withsetFont'sbasePathoption. -
License: the font files are Inter, under the SIL Open Font License 1.1;
fonts/OFL.txtships with them and must stay with any copy. This package's code is Apache-2.0.