Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix font style and PDF issues #2122

Merged
merged 12 commits into from
Nov 27, 2024
Merged

Fix font style and PDF issues #2122

merged 12 commits into from
Nov 27, 2024

Conversation

vkbo
Copy link
Owner

@vkbo vkbo commented Nov 26, 2024

Summary:

This PR fixes various font issues related to the document viewer, manuscript preview, and PDF output. These all use the same ToQTextDocument converter class. They have various font-related issues. The cause was the font matching algorithm in Qt5 being lazy and replacing fonts when changes were made in Preferences, and letting them replace the chose build settings font. A helper function now tries to overcome this, if it can. It seems to work,

This PR also fixes some minor issues in the ODT output, and fixes a bug related to resetting to regular/normal font style when using emphasis in the text, instead of the chosen default style. This only affected the ToQTextDocument converter.

Related Issue(s):

Closes #2121
Closes #2118
Related #2110

Reviewer's Checklist:

  • The header of all files contain a reference to the repository license
  • The overall test coverage is increased or remains the same as before
  • All tests are passing
  • All flake8 checks are passing and the style guide is followed
  • Documentation (as docstrings) is complete and understandable
  • Only files that have been actively changed are committed

@vkbo vkbo added this to the Release 2.6 Beta 2 milestone Nov 26, 2024
@vkbo vkbo merged commit 976328c into main Nov 27, 2024
9 checks passed
@vkbo vkbo deleted the font_styles branch November 27, 2024 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant