Skip to content

Commit

Permalink
Attempt at fixinf font width size by enable full font hinting, aka fo…
Browse files Browse the repository at this point in the history
…rcing glyphs to be aligned to pixels in order to disable subpixel positioning (source: https://www.mail-archive.com/development@qt-project.org/msg43330.html)
  • Loading branch information
ctrlaltca committed Nov 29, 2023
1 parent 7916bf0 commit c9a84af
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/kvirc/ui/KviInputEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ void KviInputEditor::applyOptions(bool bRefreshCachedMetrics)
//set the font
QFont newFont(KVI_OPTION_FONT(KviOption_fontInput));
newFont.setKerning(false);
newFont.setHintingPreference(QFont::PreferFullHinting);
setFont(newFont);

//set cursor custom width
Expand Down
1 change: 1 addition & 0 deletions src/kvirc/ui/KviIrcView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ void KviIrcView::setFont(const QFont & f)

QFont newFont(f);
newFont.setKerning(false);
newFont.setHintingPreference(QFont::PreferFullHinting);
QWidget::setFont(newFont);
update();
}
Expand Down
1 change: 1 addition & 0 deletions src/kvirc/ui/KviTopicWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ void KviTopicWidget::applyOptions()
m_pLabel->applyOptions();
QFont newFont(KVI_OPTION_FONT(KviOption_fontLabel));
newFont.setKerning(false);
newFont.setHintingPreference(QFont::PreferFullHinting);
setFont(newFont);
if(m_pCompletionBox)
m_pCompletionBox->setFont(newFont);
Expand Down

0 comments on commit c9a84af

Please sign in to comment.