Try to force Noto Sans Regular font if present. Stop increasing the checkbox/bullet sizes separately
This commit is contained in:
parent
ca3c839c7d
commit
3711df0206
4 changed files with 13 additions and 3 deletions
|
|
@ -1,3 +1,7 @@
|
||||||
|
# 0.4.3
|
||||||
|
|
||||||
|
* Favour Noto Sans font which seems to work better for unicode symbols on Fedora
|
||||||
|
|
||||||
# 0.4.2
|
# 0.4.2
|
||||||
|
|
||||||
* Improve Statistics widget height
|
* Improve Statistics widget height
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,8 @@ report from within the app.
|
||||||
|
|
||||||
Make sure you have `libxcb-cursor0` installed (it may be called something else on non-Debian distributions).
|
Make sure you have `libxcb-cursor0` installed (it may be called something else on non-Debian distributions).
|
||||||
|
|
||||||
|
It's also recommended that you have Noto Sans fonts installed, but it's up to you. It just can impact the display of unicode symbols such as checkboxes.
|
||||||
|
|
||||||
If downloading from my Forgejo's Releases page, you may wish to verify the GPG signatures with my [GPG key](https://mig5.net/static/mig5.asc).
|
If downloading from my Forgejo's Releases page, you may wish to verify the GPG signatures with my [GPG key](https://mig5.net/static/mig5.asc).
|
||||||
|
|
||||||
### From PyPi/pip
|
### From PyPi/pip
|
||||||
|
|
|
||||||
|
|
@ -41,9 +41,11 @@ class MarkdownEditor(QTextEdit):
|
||||||
self.setAcceptRichText(False)
|
self.setAcceptRichText(False)
|
||||||
|
|
||||||
# Normal text
|
# Normal text
|
||||||
self.qfont = QFont()
|
self.qfont = QFont("Noto Sans")
|
||||||
|
self.qfont.setStyleName("Regular")
|
||||||
self.qfont.setPointSize(11)
|
self.qfont.setPointSize(11)
|
||||||
self.setFont(self.qfont)
|
self.setFont(self.qfont)
|
||||||
|
self.document().setDefaultFont(self.qfont)
|
||||||
|
|
||||||
self._apply_line_spacing() # 1.25× initial spacing
|
self._apply_line_spacing() # 1.25× initial spacing
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -105,13 +105,15 @@ class MarkdownHighlighter(QSyntaxHighlighter):
|
||||||
if base_size <= 0:
|
if base_size <= 0:
|
||||||
base_size = 10.0 # fallback
|
base_size = 10.0 # fallback
|
||||||
# Checkboxes: make them a bit bigger so they stand out
|
# Checkboxes: make them a bit bigger so they stand out
|
||||||
|
fixed = QFont("Noto Sans", 11)
|
||||||
|
fixed.setStyleName("Regular")
|
||||||
self.checkbox_format = QTextCharFormat()
|
self.checkbox_format = QTextCharFormat()
|
||||||
self.checkbox_format.setFontPointSize(base_size * 1.3)
|
self.checkbox_format.setFontFamily(fixed.family())
|
||||||
self.checkbox_format.setVerticalAlignment(QTextCharFormat.AlignMiddle)
|
self.checkbox_format.setVerticalAlignment(QTextCharFormat.AlignMiddle)
|
||||||
|
|
||||||
# Bullets
|
# Bullets
|
||||||
self.bullet_format = QTextCharFormat()
|
self.bullet_format = QTextCharFormat()
|
||||||
self.bullet_format.setFontPointSize(base_size * 1.2)
|
self.checkbox_format.setFontFamily(fixed.family())
|
||||||
|
|
||||||
# Markdown syntax (the markers themselves) - make invisible
|
# Markdown syntax (the markers themselves) - make invisible
|
||||||
self.syntax_format = QTextCharFormat()
|
self.syntax_format = QTextCharFormat()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue