Skip to main content
Module

x/canvas/mod.ts>TypefaceFactory

Canvas API for Deno, ported from canvaskit-wasm (Skia).
Latest
interface TypefaceFactory
import { type TypefaceFactory } from "https://deno.land/x/canvas@v1.4.1/mod.ts";

Methods

MakeFreeTypeFaceFromData(fontData: ArrayBuffer): Typeface | null

Create a typeface using Freetype from the specified bytes and return it. CanvasKit supports .ttf, .woff and .woff2 fonts. It returns null if the bytes cannot be decoded.