@carrot-kpi/switzer-font

中文文档
0.1.0发布于 2023/05/11MIT零依赖近 30 天下载 2839

Self-host the Switzer font in a neatly bundled NPM package.

原始使用文档
文档目录3 节
  1. Quick Installation
  2. Licensing
  3. Other Notes

Fontsource Switzer

npm (scoped) Generic badge Monthly downloads Total downloads GitHub stars

The CSS and web font files to easily self-host the “Switzer” font. Please visit the main Fontsource website to view more details on this package.

Quick Installation

Fontsource has a variety of methods to import CSS, such as using a bundler like Webpack. Alternatively, it supports SASS. Full documentation can be found here.

yarn add @fontsource/switzer // npm install @fontsource/switzer

Within your app entry file or site component, import it in.

import "@fontsource/switzer"; // Defaults to weight 400.

Supported variables:

  • Weights: [100,200,300,400,500,600,700,800,900]
  • Styles: [italic,normal]
  • Supported subsets: [latin]

Finally, you can reference the font name in a CSS stylesheet, CSS Module, or CSS-in-JS.

body {
  font-family: "Switzer";
}

Licensing

It is important to always read the license for every font that you use. Most of the fonts in the collection use the SIL Open Font License, v1.1. Some fonts use the Apache 2 license. The Ubuntu fonts use the Ubuntu Font License v1.0.

Font Source and License.

Other Notes

Font version (provided by source): ``.

Feel free to star and contribute new ideas to this repository that aim to improve the performance of font loading, as well as expanding the existing library we already have. Any suggestions or ideas can be voiced via an issue.

版本与发布记录

@carrot-kpi/switzer-font 共发布 1 个版本,首次发布于 2023/05/11;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.1.0latest2023/05/113 年前

关于 @carrot-kpi/switzer-font 的常见问题

@carrot-kpi/switzer-font 是什么?

Self-host the Switzer font in a neatly bundled NPM package.

如何安装 @carrot-kpi/switzer-font?

在项目目录运行 npm install @carrot-kpi/switzer-font,或使用 pnpm add / yarn add / bun add。

@carrot-kpi/switzer-font 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/carrot-kpi__switzer-font 是否存在。

@carrot-kpi/switzer-font 可以商用吗?

@carrot-kpi/switzer-font 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@carrot-kpi/switzer-font 的下载量有多少?

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

@carrot-kpi/switzer-font 还在维护吗?

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