Skip to content

pantoken / formats/icon-font/src / buildIconFont

Fonksiyon: buildIconFont()

buildIconFont(options?): Promise<IconFontResult>

Beta

İkon yazı tipini oluştur.

Parametreler

options?

BuildIconFontOptions = {}

BuildIconFontOptions.

Döndürür

Promise<IconFontResult>

Bu IconFontResult.

Örnekler

Tam yazı tipini oluşturun ve artefaktları yazın

ts
import { buildIconFont } from "@pantoken/icon-font";
import { writeFileSync } from "node:fs";

const font = await buildIconFont();
writeFileSync("PanTokens.woff2", font.woff2);
writeFileSync("PanTokens.ttf", font.ttf);
writeFileSync("icons.css", font.css);

Özel bir yazı tipi adı ve başka bir temadan bir simge altkümesi

ts
import { buildIconFont } from "@pantoken/icon-font";

const font = await buildIconFont({
  fontName: "Instructure",
  icons: ["arrow-left", "check-mark"],
  theme: "canvas",
});
font.codepoints; // { "arrow-left": "e000", "check-mark": "e001" }