mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-27 03:27:21 -06:00
Review follow-up. `Metrics::from_dict` leaves `base_font` empty when a font has no `/BaseFont`, and a bare subset tag such as `/ABCDEF+` left an empty name after stripping. Two consequences: - `same_style` split one paragraph into separate reading blocks for the exporters when both names were empty, though they grouped before subset joining; - `/ABCDEF+` and `/GHIJKL+` compared equal after stripping, so unrelated malformed fonts could join into one line. `same_base_font` now strips both tags first and requires a non-empty, equal name, so a missing name or a bare tag matches nothing. `same_style` keeps grouping lines whose fonts both lack a name, since the resource or fallback face `same_font` already matched is their whole identity. Tests: a page in a font without `/BaseFont` still reads as one block (it split into two before this change), and a bare tag matches no other name.