sempdf
sempdf v1.9.1Functions

Function: foldToAscii()

sempdf v1.9.1


sempdf / foldToAscii

function foldToAscii(text, asciiOnly?): string;

Defined in: src/internal/html-blocks.ts:502

Folds characters the built-in (ASCII-only) fonts cannot encode: the explicit map above first, then Unicode decomposition to strip accents, so Muñoz and café survive with base-14 fonts.

Parameters

ParameterTypeDefault valueDescription
textstringundefinedThe text to fold.
asciiOnlybooleanfalseWhen true, drops anything still outside ASCII after folding (Devanagari, CJK, emoji). Lossy — off by default so content is never silently discarded.

Returns

string

On this page