Skip to main content
Module

x/canvas/mod.ts>ParagraphBuilderFactory

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

Methods

Make(style: ParagraphStyle, fontManager: FontMgr): ParagraphBuilder

Creates a ParagraphBuilder using the fonts available from the given font manager.

MakeFromFontProvider(style: ParagraphStyle, fontSrc: TypefaceFontProvider): ParagraphBuilder

Creates a ParagraphBuilder using the fonts available from the given font provider.

ShapeText(
text: string,
runs: FontBlock[],
width?: number,
): ShapedLine[]

Return a shaped array of lines