sempdf v1.9.1Functions
Function: foldToAscii()
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
| Parameter | Type | Default value | Description |
|---|---|---|---|
text | string | undefined | The text to fold. |
asciiOnly | boolean | false | When true, drops anything still outside ASCII after folding (Devanagari, CJK, emoji). Lossy — off by default so content is never silently discarded. |
Returns
string