Skip to main content
Module

x/canvas/mod.ts>FontConstructor

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

See SkFont.h for more.

Methods

new(face: Typeface | null, size?: number): Font

Constructs Font with default values with Typeface.

new(
face: Typeface | null,
size: number,
scaleX: number,
skewX: number,
): Font

Constructs Font with default values with Typeface and size in points, horizontal scale, and horizontal skew. Horizontal scale emulates condensed and expanded fonts. Horizontal skew emulates oblique fonts.