Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/canvas/src/canvaskit.ts>TypefaceFactory

Canvas API for Deno, ported from canvaskit-wasm (Skia).
Go to Latest
interface TypefaceFactory
import { type TypefaceFactory } from "https://deno.land/x/canvas@v1.3.0/src/canvaskit.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.