@molecule/app-fonts-source-sans-3
Provider bond · fonts · App (browser) · v1.1.5 · Apache-2.0
Source Sans Pro (Source Sans 3) — local, self-hosted font (no external CDN)
npm install @molecule/app-fonts-source-sans-3npm · Source on GitHub · Implements @molecule/app-fonts
How it works
@molecule/app-fonts-source-sans-3 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 as sans } from '@molecule/app-fonts-source-sans-3'
setFont(sans) // once, at app startup — before first paintWorks with: @molecule/app-fonts
Reference
Source Sans Pro font for molecule.dev — the current upstream Source Sans 3
variable font, served locally under the family name Source Sans Pro.
Use this for any stylesheet that asks for 'Source Sans Pro', sans-serif
(the RealWorld/Conduit theme among others) instead of downloading the font
from a CDN or npm packing fontsource in the sandbox. The bond registers the
sans role and injects the @font-face for the packaged file.
Do not npm install source-sans-pro (or @fontsource/source-sans-pro,
typeface-source-sans-pro) for a stylesheet that asks for this family: this
bond IS the family, already available to the sandbox, and wiring it is one
setFont() call. The install only adds a second, unused copy under the
workspace root's node_modules after ~90 s, and that copy is not where a
path relative to the app directory looks.
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 as sans } from '@molecule/app-fonts-source-sans-3'
setFont(sans) // once, at app startup — before first paint
Type
provider
Installation
npm install @molecule/app-fonts-source-sans-3 @molecule/app-fonts
API
Constants
font
Source Sans Pro (upstream: Source Sans 3) font definition — local, self-hosted (no external CDN).
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 -
The package name follows the font's current upstream name (Adobe renamed Source Sans Pro to Source Sans 3); the
familyisSource Sans Proso the CSS family a shipped theme writes matches with no edit. -
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. -
The registry retains filenames for
mlclstatic font copying. A custom face may still use a plain filename withsetFont'sbasePathoption. -
License: the font files are Source Sans Pro, 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.