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

x/canvas/src/canvaskit.ts>Typeface

Canvas API for Deno, ported from canvaskit-wasm (Skia).
Go to Latest
interface Typeface
implements EmbindObject<Typeface>
import { type Typeface } from "https://deno.land/x/canvas@v1.3.0/src/canvaskit.ts";

See SkTypeface.h for more on this class. The objects are opaque.

Methods

getGlyphIDs(
str: string,
numCodePoints?: number,
output?: GlyphIDArray,
): GlyphIDArray

Retrieves the glyph ids for each code point in the provided string. Note that glyph IDs are typeface-dependent; different faces may have different ids for the same code point.