github rupor-github/fb2cng v1.3.6

6 hours ago

KFX/AZW8 rendering fixes

  • Fixed nondeterministic embedded font resource assignment in generated AZW8/KFX files.
    • Embedded fonts now keep stable resource IDs between conversions.
    • This fixes cases where paragraph/title/dropcap fonts could appear to “flip” between repeated generations of the same FB2 file.
    • Font declarations now follow deterministic @font-face order instead of Go map iteration order.
  • Fixed KFX resource ID collisions after unused image resources are filtered.
    • Font resource numbering now starts after the highest existing image resource location, not after the count of remaining raw media fragments.
    • This prevents $417 raw media and $418 raw font fragments from sharing the same resource/rsrc* ID.
  • Made fragment sorting stable for duplicate root font fragments.
    • This preserves the intended font declaration order during KFX container serialization.

KFX/AZW8 dropcap spacing fixes

  • Improved KFX handling for dropcap paragraphs followed by normal paragraphs.
    • Dropcap paragraph pairs are now wrapped together when negative horizontal margins are involved.
    • Child paragraph margins are clamped inside the wrapper to avoid Kindle/KFX dropcap layout distortion.
  • Fixed excessive spacing after dropcap paragraphs.
    • The dropcap paragraph’s bottom margin is stripped at the internal wrapper boundary.
    • Only the intended normal paragraph gap is transferred to the following paragraph.
    • Avoids leaking the default paragraph margin into dropcap layouts when CSS requested zero or smaller spacing.

Full Changelog: v1.3.5...v1.3.6

Don't miss a new fb2cng release

NewReleases is sending notifications on new releases.