@adamhl8/font-iosevka
v0.1.5
Published
Custom Iosevka web fonts, with Nerd Fonts-patched TTFs attached to each GitHub release
Maintainers
Readme
font-iosevka
Custom Iosevka fonts, patched with Nerd Fonts glyphs.
Two families are built from the build plans in this repo (Iosevka and IosevkaTerminal), and every generated TTF is patched with the Nerd Fonts font-patcher. Each release ships in two forms:
- Desktop install: the 8 Nerd Font TTFs are attached to the GitHub release. TTF is the format macOS, Windows, and terminal emulators install.
woff2is not installable as a system font. - Web: the
@adamhl8/font-iosevkanpm package ships the four plainIosevkafaces aswoff2plus anindex.css.
Desktop install
Download the TTFs you want from the latest release and install them.
| Family name | Files | Spacing |
| --------------------------- | ------------------------------- | ------------ |
| Iosevka Nerd Font | IosevkaNerdFont-*.ttf | proportional |
| IosevkaTerminal Nerd Font | IosevkaTerminalNerdFont-*.ttf | terminal |
Each comes in Regular, Italic, Bold, and BoldItalic. Use the family name (not the filename) when configuring a terminal or editor.
The unpatched Iosevka and IosevkaTerminal TTFs are built but not released. They only exist as patcher input, and plain Iosevka reaches the web as woff2 below.
Web usage
npm install @adamhl8/font-iosevkaOnly the plain Iosevka family is published as a web font. With Astro's Fonts API:
import { fontProviders } from "astro/config"
fonts: [
{
provider: fontProviders.npm(),
name: "Iosevka", // must match the font-family in the package's index.css
cssVariable: "--font-iosevka",
options: { package: "@adamhl8/font-iosevka" },
},
]Astro's npm provider rewrites the src URLs to jsDelivr and fetches the woff2 at build time, so the package version you install must be published to npm.
Outside Astro, import the stylesheet directly:
import "@adamhl8/font-iosevka/index.css"The package intentionally has no exports map, so font files stay resolvable by path (for example @adamhl8/font-iosevka/web/Iosevka-Regular.woff2, which is how fontProviders.local() reads them).
Building
The fonts are built by CI on release, so you only need this to regenerate the committed web fonts (after bumping IOSEVKA_REF in src/index.ts, say).
The following must be available on PATH:
gitcurlunzipfontforgettfautohintuv
just build-fontsEverything happens in the current working directory: the Iosevka repo is cloned and built there, fonts are patched, and the intermediate directories (Iosevka/, font-patcher/, in/) are cleaned up afterwards. It writes the 8 Nerd Font TTFs to out/, and the web fonts to index.css and web/ (both of which are committed, since the npm publish job has no font toolchain).
License
The build script is MIT. The fonts it produces are Iosevka, licensed under the SIL Open Font License 1.1.
