mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-10 12:21:54 +00:00
A mark glyph's vertical translation started a new draw_glyphs batch, so krilla received the cluster's source range again and mapped its characters twice. Copying or searching the exported PDF then found doubled letters for Arabic harakat in any font, and for every dotted letter in fonts that draw dots as zero-advance mark glyphs (Noto Sans, Naskh and Kufi Arabic). Keep compatible glyphs on the same layout line in one batch and carry their relative vertical placement as per-glyph y_offset; horizontal placement is unchanged (next_x - x advances). Font, size, linear transform, line/column, paint run, list marker and hyphen boundaries still split batches. Krilla keeps owning cluster mappings and ActualText. No importer change. Regressions decode the content stream and ToUnicode maps: one batch per layout line, no duplicated cluster assignment, one ActualText per multi-glyph cluster, contours within 0.05 pt of outline export; mixed scripts, vertical columns, path rotations and PDF/X variants covered. The reader round-trip stays an ignored test until the importer consumes ActualText (#6165). Addresses #6309.