Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/canvas/mod.ts>SkFontConstructor

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

See SkFont.h for more.

Methods

new(face: SkTypeface | null, size?: number): SkFont

Constructs SkFont with default values with SkTypeface.

new(
face: SkTypeface | null,
size: number,
scaleX: number,
skewX: number,
): SkFont

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