Skip to content

Fix paragraph font inheritance in rich text spans - #341

Merged
AnEnglishmanInNorway merged 1 commit into
bash0:masterfrom
henfri:codex/fix-paragraph-font-inheritance
Nov 9, 2026
Merged

AnEnglishmanInNorway merged 1 commit into
bash0:masterfrom
henfri:codex/fix-paragraph-font-inheritance

Conversation

@henfri

@henfri henfri commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Qt rich text can store a subtitle's font family, point size, weight and italic style on its paragraph, while the child span contains only a colour. The converter previously rendered that span using the body's heading font (for example, a 16 pt italic subtitle became a 26 pt bold heading).

Resolve inline body, paragraph and span styles in inheritance order before selecting the font. Child overrides take precedence. Add a regression test covering paragraph inheritance, colour overrides and a following heading, plus a short architecture note.

Validation:

  • 77 focused tests passed; flake8 passed.
  • Three real album spreads were rendered and compared with CEWE reference screenshots, arranged vertically for review. The album owner reviewed the corrected results and approved their appearance.
  • A complete 204-page corrected album was exported successfully. PDF text inspection confirms a 26 pt Georgia Bold heading and a 16 pt Segoe UI Italic subtitle with the intended colours (#1e293b and #475569).
  • The full test suite is not passing or fully validated: the run was stopped at 26% after reporting failures. A stop-on-first-failure rerun failed the background-alignment pixel comparison. Its logs show local export configuration leaking into the fixture (300 dpi, system-font discovery and a key-account override). This requires a clean-configuration rerun before claiming full regression coverage; the other failures have not been diagnosed.

No private album files or screenshots are included.

@AnEnglishmanInNorway

Copy link
Copy Markdown
Collaborator

Hi Hendrik. I just cherry picked your commit to a branch on my fork and successfully ran a full test suite, so this looks good to go. I have one question, though - what do you do in the album editor to create this situation? I'm thinking I could add a bit of text to the testTextBox.mcf so that we get an example of this sort of text layout into the pixel comparison regression tests.

@AnEnglishmanInNorway
AnEnglishmanInNorway merged commit 7404a73 into bash0:master Nov 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants