Copy-pasted invisible characters no longer draw stray glyphs
Zero-width spaces, bidi marks and other invisible characters that arrive with copy-pasted text — including soft hyphens and byte-order marks — now draw nothing, so a document no longer picks up a stray kanji, an extra space or an unexpected hyphen in the PDF.
Text copied from a web page often carries invisible characters with it: zero-width spaces (U+200B) inserted as line-break hints, zero-width non-joiners (U+200C), a byte-order mark (U+FEFF), or a soft hyphen (U+00AD) from a word processor. These characters have no visible glyph, but the renderer used to look for one anyway — and when the chosen font did not have it, it substituted a space, or in some fonts an unrelated glyph. A Japanese document built from copied text could end up with a stray kanji or an unexplained gap in the output.
Copied Arabic and Hebrew text carries a second family of these: the bidi controls — left-to-right mark (U+200E), right-to-left mark (U+200F), Arabic letter mark (U+061C), the embeddings and overrides (U+202A–U+202E) and the isolates (U+2066–U+2069). They had the same problem, and in a Japanese document with an embedded right-to-left fragment they added a visible space (or, in a font with no space, a stray ideograph) where the control should be invisible. The remaining zero-width default-ignorables — word joiner, invisible operators, Mongolian variation selectors, the combining grapheme joiner, shorthand and musical format controls, reserved annotation controls and the tag/language-tag plane — are covered too.
All of these are now recognised as invisible throughout the pipeline: they are never encoded as a glyph, never count as font coverage when the renderer picks a fallback font for a character, and never add width to the measured line. The text around them renders exactly as if they were not there, and copy-paste from the PDF still reads the visible text. Bidi reordering is not part of this change — there is no bidi pass — so right-to-left text still renders in logical order; this fix is only about the controls no longer drawing a substitute.
One behaviour change worth knowing about: a soft hyphen no longer draws a hyphen in the middle of an unbroken word. A soft hyphen is a hyphenation hint — it marks where a word may break — and the renderer does not perform hyphenation, so the word now renders unbroken. If you need a visible hyphen, use a regular hyphen (- or U+2010).
Nothing to change on your side: re-render any document where you saw an unexpected gap or stray character and it will come out clean. This applies to every entry point — POST /api/v1/md, templates through /api/v1/render, the canvas endpoint, and the web app's converters.