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
|
|
@ -41,9 +41,11 @@ class MarkdownEditor(QTextEdit):
|
|||
self.setAcceptRichText(False)
|
||||
|
||||
# Normal text
|
||||
self.qfont = QFont()
|
||||
self.qfont = QFont("Noto Sans")
|
||||
self.qfont.setStyleName("Regular")
|
||||
self.qfont.setPointSize(11)
|
||||
self.setFont(self.qfont)
|
||||
self.document().setDefaultFont(self.qfont)
|
||||
|
||||
self._apply_line_spacing() # 1.25× initial spacing
|
||||
|
||||
|
|
|
|||
|
|
@ -105,13 +105,15 @@ class MarkdownHighlighter(QSyntaxHighlighter):
|
|||
if base_size <= 0:
|
||||
base_size = 10.0 # fallback
|
||||
# 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.setFontPointSize(base_size * 1.3)
|
||||
self.checkbox_format.setFontFamily(fixed.family())
|
||||
self.checkbox_format.setVerticalAlignment(QTextCharFormat.AlignMiddle)
|
||||
|
||||
# Bullets
|
||||
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
|
||||
self.syntax_format = QTextCharFormat()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue