Commit Graph
6 Commits
Author SHA1 Message Date
ldm0 4b34263557 fix(pdf): avoid duplicate color glyph painting 2026-10-28 05:30:13 +08:00
ldm0 832252e610 fix(pdf): preserve SVG fallback paint per glyph 2026-10-28 05:30:13 +08:00
ldm0 b8c6e1b9fd fix(paint): use CSS pixels for synthetic glyph weight 2026-10-28 05:30:13 +08:00
ldm0 7ffaa4ac1c fix(pdf): retain stroked degenerate glyph outlines 2026-10-26 19:26:49 +08:00
ldm0 2ce9dee328 refactor(pdf): share glyph geometry for text ink bounds
Resolve font metrics and text paint together for native PDF culling and
filter raster allocation, following SkPDFStrike and SkStrokeRec. Replace
the unconditional origin/em guard for outline glyphs with measured bounds.

Align static TrueType bounds with the rendered side bearing and retain
conservative fallback for missing outlines. Empty glyphs do not expand
raster allocations; native advance boxes preserve whitespace semantics.

Add coverage for negative side bearings, variable/CJK fonts, skew, and
empty runs. The 20px/8px probe shrinks from 224x224 to 96x104 raster pixels
while retaining reference ink coverage and searchable text.
2026-10-26 19:26:49 +08:00
ldm0 4fea7994ad fix(paint): align text stroke joins with Chromium
Use explicit miter joins and a shared miter limit of 4 for CPU and PDF
text strokes. Use the same conservative expansion for layout outsets
and native PDF clipping, including synthetic bold stroke widening.

Add deterministic triangle glyphs to cover pointed joins, bevel fallback,
and miter-only ink entering a PDF clip.
2026-10-26 19:26:49 +08:00