Commit Graph
36 Commits
Author SHA1 Message Date
ldm0 0a0d0f0d11 refactor(paint): remove rendering work budgets 2026-11-12 20:24:33 +08:00
ldm0 068874f363 fix(pdf): preserve printing when link deduplication hits its budget
Sweep link candidates by full target and reject impossible containment using polygon bounds. Keep the original clipped regions when optional deduplication exhausts its work budget. Cover dense HTML printing, PDF annotations, partial-work fallback, and target identity.
2026-11-12 19:34:38 +08:00
ldm0 05ea642be9 fix(pdf): deduplicate link regions independently of paint order 2026-11-12 16:02:40 +08:00
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 49318d2729 perf(pdf): cache glyph contours per document in Moli 2026-10-28 05:30:13 +08:00
ldm0 61a7cb1b65 refactor(pdf): delegate expanded glyph drawing to Krilla
Pin the shared expansion API and leave clipping and page ownership in the adapter. Krilla handles synthesis contours, paint order, document-wide reuse, and searchable text.
2026-10-28 05:30:13 +08:00
ldm0 4f785db138 fix(pdf): reuse visible synthesized glyph contours
Preserve X/Y expansion and fill opacity, keep native text semantics where possible, and prepare reusable contour graphics after page clipping.
2026-10-28 05:30:13 +08:00
ldm0 22988c042e fix(pdf): share glyph ink measurement through AnyRender 2026-10-28 05:30:13 +08:00
ldm0 688797f77e fix(pdf): stroke expanded synthetic glyph contours 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 199f2bc3fe fix(pdf): preserve color glyph ink in filter rasters 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 eed7844ab0 test(paint): match Chromium HTML text shadow semantics
Correct the claim that ordinary HTML text shadows include stroke ink.
Chromium removes the stroke pass shadow looper when fill mode is present.

Compare shadow regions pixel for pixel against unstroked text for both
paint orders, and keep the SVG paint path outside this HTML contract.
2026-10-26 19:26:49 +08:00
ldm0 22258f3db7 fix(pdf): preserve wide text strokes in filter rasters
Include the shared text-stroke and synthetic-bold ink expansion when
allocating filter fallback images, before applying the run transform.

Compare embedded PDF alpha coverage with a complete reference raster
for 100px hollow strokes at multiple scales and retain 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
ldm0 0592aefda4 fix(pdf): keep filtered hollow text searchable 2026-10-26 19:26:49 +08:00
ldm0 3c246d917b fix(pdf): include text stroke in clipping and page bounds 2026-10-26 19:26:49 +08:00
ldm0 61c1d8bf2e fix(pdf): preserve CSS pixel synthetic bold expansion 2026-10-26 19:26:49 +08:00
sicko7947 2d99ecfd3b fix(pdf): scale text stroke emboldening 2026-10-26 19:26:49 +08:00
local-draft 5d61607c8c fix(paint): scale text-stroke widening by the rendered embolden; pin text-shadow limitation 2026-10-26 19:26:49 +08:00
local-draft 0982ba20c1 feat(paint): support -webkit-text-stroke and paint-order for glyph runs 2026-10-26 19:26:49 +08:00
ldm0 b3d0d5231a fix(paint): cover large repeated raster backgrounds 2026-10-15 19:57:42 +08:00
ldm0 4c589bd884 feat(paint): preserve path winding rules in native snapshots 2026-10-13 19:53:21 +08:00
ldm0 92c1a870bf refactor(pdf): separate print entry points and shared paint code 2026-10-13 00:34:09 +08:00
ldm0 5be5f7c50d feat(pdf): preserve clickable links and internal destinations 2026-10-13 00:34:09 +08:00
ldm0 778a35bd07 fix(paint): restore Muse pill corners and SVG colors 2026-10-13 00:17:07 +08:00
ldm0 53d16780d5 feat(pdf): render searchable PDFs with Krilla
Route CDP Page.printToPDF and CLI PDF dumps through an owned snapshot PDF
backend with embedded subset fonts and logical text cluster mappings.

Preserve print layout isolation, page selection, and bounded local raster
fallbacks. Pin Krilla to upstream Git and share its font parsing dependencies
with the existing rendering stack where version constraints allow.

Add PDF extraction, pagination, graphics, and print lifecycle regressions,
fixed font fixtures, and reader and CDP smoke checks.

Refs #279.
2026-10-12 21:33:26 +08:00
ldm0 c31404d801 refactor: use stable atomic updates and fixed-size slice chunks 2026-10-08 19:56:33 +08:00
ldm0 46d5abcae3 feat(emulation): support default background color overrides 2026-09-15 14:46:31 +08:00
ldm0 2b51bdd12a feat(screenshot): relax full-document capture limits 2026-08-18 00:35:51 +08:00
ldm0 e2aa24db14 Unify pre-transform paint coordinate state 2026-08-15 00:53:52 +08:00
ldm0 1b54b74469 Pixel-snap images in pre-transform paint space 2026-08-14 17:59:12 +08:00
ldm0 8369c3e0ee Fix synthetic italic rendering direction 2026-08-14 15:09:57 +08:00
ldm0 27b5135cb6 Public preview 2026-08-11 00:10:12 +08:00