@aurea-uds/fonts

中文文档
0.62.1发布于 2026/11/08OFL-1.1TypeScriptCommonJS零依赖近 30 天下载 6266

As fontes da Aurea: Inter (texto), Sora (títulos) e IBM Plex Mono (código), em WOFF2 para a web (@aurea-uds/fonts/css). Para o React Native (@aurea-uds/fonts/native), as mesmas três em TTF estático, um arquivo por peso.

原始使用文档
文档目录4 节
  1. In React Native
  2. Where the files come from
  3. Why a package of its own
  4. License

@aurea-uds/fonts

The fonts of Aurea UDS, with the @font-face rules it expects (since 0.39.0):

  • Inter for text and controls;
  • Sora for headings;
  • IBM Plex Mono for code and values (numeric and the KPI number).

Up to 0.38.0 the web used Atkinson Hyperlegible; up to 0.12.4, IBM Plex.

pnpm add @aurea-uds/fonts
import "@aurea-uds/fonts/css";  // BEFORE @aurea-uds/core/css

Order matters: the core only declares --font-ui, --font-heading, --font-editorial and --font-code, and this package is what points those names to real files. Import the core first and the first paint falls back to a system font.

Headings get Sora on their own: the core applies --font-heading to every h1 to h6 through a zero-specificity rule. A font you set on the heading itself wins over it; a font the heading only inherits from its parent (body{font-family:…}) loses.

⚠ --font-editorial has no font of its own: it points to the text font (Inter today). It still exists only so that code using it does not break; it is removed in 1.0.

In React Native

React Native does not read woff2, and on Android it does not read variable fonts: native gets the same three families as static .ttf, one file per weight (@aurea-uds/fonts/native). Load AUREA_FONTS and pass FONT_FAMILIES to AureaProvider:

import {AureaProvider} from "@aurea-uds/native";
import {AUREA_FONTS, FONT_FAMILIES} from "@aurea-uds/fonts/native";
import {useFonts} from "expo-font";

const [pronto] = useFonts(AUREA_FONTS);
// ...
<AureaProvider fontFamilies={FONT_FAMILIES}>{/* your app */}</AureaProvider>

On the device, each weight is a family of its own, named after the file's PostScript name: Inter-SemiBold, Sora-Bold, IBMPlexMono-Medm. FONT_FAMILIES points the requested role and weight to them; without it, the device falls back to the system font. There are 14 files, complete (every script each font draws): 3.17 MB in the app.

Where the files come from

filesourcehow
inter-variable-normal.woff2, inter-variable-italic.woff2Inter 4.1 from the author (rsms/inter, Inter-4.1.zip, folder web/)subset to the Latin range by cortar-fontes.py; still variable (weight 100–900 and optical size 14–32)
sora-variable-normal.woff2google/fonts, ofl/sora/Sora[wght].ttf, commit a926665019d3subset the same way; variable (weight 100–800)
ibm-plex-mono-400-normal.woff2, -500-, -600-@ibm/plex-mono 2.5.0, fonts/split/woff2/IBMPlexMono-{Regular,Medium,SemiBold}-Latin1.woff2no change at all (the license reserves the name "Plex") — only the file name

The subset keeps the characters the web served before (the latin subset, 218) and every design feature, such as equal-width figures (tnum). Inter keeps 217 of them (the original has no division slash ∕) and Sora 217 (it has no thin space); the Latin1 subset of IBM Plex Mono covers 214. To rebuild and check:

python packages/fonts/cortar-fontes.py <InterVariable.woff2> <InterVariable-Italic.woff2> <Sora[wght].ttf>

The script prints the digest (sha256) of each file. The IBM files are checked against IBM's package:

filesha256 (start)
ibm-plex-mono-400-normal.woff2e8993d946649b9d0
ibm-plex-mono-500-normal.woff241201b658a328b9d
ibm-plex-mono-600-normal.woff2b7acd05041ab65f3

The native .ttf files (files-native/):

filesourcehow
inter-{400,500,600,700,800}-normal.ttf, inter-400-italic.ttfInter 4.1 from the author (Inter-4.1.zip, folder extras/ttf/)no change, only the file name
sora-{400,500,600,700,800}-normal.ttfthe same Sora[wght].ttf as the webpinned to one weight per file, with each weight's name
ibm-plex-mono-{400,500,600}-normal.ttf@ibm/plex-mono 2.5.0, fonts/complete/ttf/IBMPlexMono-{Regular,Medium,SemiBold}.ttfno change (the reserved name "Plex")
python packages/fonts/fontes-nativas.py <Inter-4.1.zip> <ibm-plex-mono.zip> <Sora[wght].ttf>

The script gives the same output on every run and prints the digest of each file:

filesha256 (start)
inter-400-normal.ttf40d692fce188e447
inter-400-italic.ttfbbc051dd204b5019
inter-500-normal.ttf97ad806f526e4154
inter-600-normal.ttf78a843fade9d4612
inter-700-normal.ttf288316099b1e0a47
inter-800-normal.ttfe6756ad5690b7760
sora-400-normal.ttfd160a9b5551b207a
sora-500-normal.ttf5924a0b3b90f6591
sora-600-normal.ttf71962517584791ef
sora-700-normal.ttff09649958726cec7
sora-800-normal.ttf4ea25ce1d1f41736
ibm-plex-mono-400-normal.ttf7c6fbddca4b700be
ibm-plex-mono-500-normal.ttf98fbd727aae340b2
ibm-plex-mono-600-normal.ttff04d7c488ddf7d1f

Up to 0.40.0 native used Atkinson Hyperlegible; none of its files remain in the package.

Why a package of its own

It was split out of the core so that anyone who already serves the font — from their own CDN, or hosted with other subsets — can skip it without copying and editing the stylesheet.

License

The three families are under the SIL Open Font License 1.1, and the license text ships with the package, with the copyright of each one. IBM Plex Mono has the reserved font name "Plex": a modified file cannot carry that name — that is why its files ship unchanged. The OFL is not Apache-2.0: read it before redistributing the font files.

版本与发布记录

@aurea-uds/fonts 共发布 78 个版本,首次发布于 2026/07/31;过去 12 个月发布了 78 个版本。

版本发布日期距今
0.62.1latest2026/11/08今天
0.62.02026/11/08今天
0.61.02026/11/071 天前
0.59.02026/11/071 天前
0.56.02026/11/052 天前
0.54.12026/11/044 天前

关于 @aurea-uds/fonts 的常见问题

@aurea-uds/fonts 是什么?

As fontes da Aurea: Inter (texto), Sora (títulos) e IBM Plex Mono (código), em WOFF2 para a web (@aurea-uds/fonts/css). Para o React Native (@aurea-uds/fonts/native), as mesmas três em TTF estático, um arquivo por peso.

如何安装 @aurea-uds/fonts?

在项目目录运行 npm install @aurea-uds/fonts,或使用 pnpm add / yarn add / bun add。

@aurea-uds/fonts 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@aurea-uds/fonts 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@aurea-uds/fonts 可以商用吗?

@aurea-uds/fonts 使用 OFL-1.1 许可。声明的许可为 OFL-1.1,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@aurea-uds/fonts 的下载量有多少?

根据 npm 官方下载统计,@aurea-uds/fonts 在 2026/10/07 – 2026/11/05 这 30 天内被下载 6,266 次,日均约 209 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@aurea-uds/fonts 还在维护吗?

最新版本 0.62.1 发布于 2026/11/08(今天);至今共发布 78 个版本,其中过去 12 个月发布了 78 个;首次发布于 2026/07/31。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。