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

x/canvas/src/types.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.2/src/types.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