github rupor-github/fb2cng v1.4.2

5 hours ago

PDF rendering

  • Fixed incorrect dropcap glyph rendering in PDFs when shaped text fragments shared glyph storage with the parent line.
    • Prevents double remapping of subset glyph IDs.
    • Fixes cases where Cyrillic dropcaps, such as У, could render as the wrong glyph.

PDF cleanup/refactoring

  • Removed low-value pass-through helpers in convert/pdf, including wrappers around text shaping, inline paragraph layout, image sizing, CSS shorthand parsing, style merging, and content margins.
  • Consolidated PDF content margin calculation into a single pdfContentMargins(..., stripRootHorizontal bool) helper.
  • Deduplicated paragraph line finalization between plain and inline paragraph layout.
  • Deduplicated paragraph font/length style merge logic while preserving different inherited/override semantics.
  • Consolidated repeated fragment X-advance logic for rendering, links, debug layout, inline images, and visual bounds.
  • Deduplicated printed footnote reference scanning.
  • Simplified PDF font registry construction and removed production zap.NewNop() fallback from the font registry.
  • Moved test-only helpers out of production files and folded tiny test helper files into their owning tests.

Full Changelog: v1.4.1...v1.4.2

Don't miss a new fb2cng release

NewReleases is sending notifications on new releases.