@molecule/app-fonts-jetbrains-mono

Provider bond · fonts · App (browser) · v1.0.3 · Apache-2.0

Developer-focused monospace font with ligatures (local fonts)

npm install @molecule/app-fonts-jetbrains-mono

npm · Source on GitHub · Implements @molecule/app-fonts

How it works

@molecule/app-fonts-jetbrains-mono 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 mono } from '@molecule/app-fonts-jetbrains-mono'

setFont(mono) // once, at app startup — before first paint

Works with: @molecule/app-fonts

Reference

JetBrains Mono font bond for molecule.dev — a developer-focused monospace font. Exports a ready-made FontDefinition (font, role mono) with locally-served TTF faces (regular 400, bold 700, variable 100-800).

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.ts JSDoc, not this file.

Quick Start

import { setFont } from '@molecule/app-fonts'
import { font as mono } from '@molecule/app-fonts-jetbrains-mono'

setFont(mono) // once, at app startup — before first paint

Type

provider

Installation

npm install @molecule/app-fonts-jetbrains-mono @molecule/app-fonts

API

Constants

font

JetBrains Mono font definition — developer-focused monospace font.

const font: FontDefinition

Core Interface

Implements @molecule/app-fonts interface.

Injection Notes

Requirements

Peer dependencies:

  • @molecule/app-fonts ^1.0.1

Runtime Dependencies

  • @molecule/app-fonts

  • Fills the mono role only (--mol-font-mono — code blocks, editors, terminals). It does not change the app's body font; pair with a sans bond (e.g. @molecule/app-fonts-inter) for UI text.

  • Wire with setFont() from @molecule/app-fonts, never a raw bond('font', …) — setFont() sets the CSS variable and injects the @font-face rules; a raw bond renders nothing.

  • Wiring it without mlcl (the sandbox): the package is already installed under node_modules — add an "@molecule/app-fonts-jetbrains-mono" dependency to the app's package.json (pin the version already installed there), then in app/src/bonds/index.ts call setFont(mono). Preferred: import each face as an asset so nothing is copied (one import per entry of font.source.faces) — import face0 from '@molecule/app-fonts-jetbrains-mono/fonts/JetBrainsMono-Regular.ttf?url' then setFont({ ...mono, source: { type: 'local', faces: [{ file: face0, weight: 400 }] } }), one entry per import. setFont() uses a file starting with /, http or data: as-is. Without asset imports, copy node_modules/@molecule/app-fonts-jetbrains-mono/fonts/* to app/public/fonts/ and call setFont(mono) — plain filenames are served from <basePath>fonts/<file>.