revert: turn off font hinting

This commit is contained in:
Roy Qu 2024-04-12 20:43:47 +08:00
parent 308cbb3ee8
commit 039ec299a6
5 changed files with 0 additions and 8 deletions

View File

@ -138,7 +138,6 @@ Red Panda C++ Version 2.27
- enhancement: Auto hide Project menu if no project openning. - enhancement: Auto hide Project menu if no project openning.
- fix: Toggle breakpoint by shortcut may use wrong line. - fix: Toggle breakpoint by shortcut may use wrong line.
- fix: Size of the icons in problem and problem set panel are not correct. - fix: Size of the icons in problem and problem set panel are not correct.
- change: Turn off font hinting.
Red Panda C++ Version 2.26 Red Panda C++ Version 2.26
- enhancement: Code suggestion for embedded std::vectors. - enhancement: Code suggestion for embedded std::vectors.

View File

@ -5346,7 +5346,6 @@ void Editor::applySettings()
f.setFamilies(pSettings->editor().fontFamiliesWithControlFont()); f.setFamilies(pSettings->editor().fontFamiliesWithControlFont());
f.setPixelSize(pointToPixel(pSettings->editor().fontSize())); f.setPixelSize(pointToPixel(pSettings->editor().fontSize()));
f.setStyleStrategy(QFont::PreferAntialias); f.setStyleStrategy(QFont::PreferAntialias);
f.setHintingPreference(QFont::PreferNoHinting);
setFont(f); setFont(f);
// QFont f=QFont(pSettings->editor().fontName()); // QFont f=QFont(pSettings->editor().fontName());
@ -5372,7 +5371,6 @@ void Editor::applySettings()
f.setPixelSize(pointToPixel(pSettings->editor().fontSize())); f.setPixelSize(pointToPixel(pSettings->editor().fontSize()));
} }
f.setStyleStrategy(QFont::PreferAntialias); f.setStyleStrategy(QFont::PreferAntialias);
f.setHintingPreference(QFont::PreferNoHinting);
gutter().setFont(f); gutter().setFont(f);
gutter().setDigitCount(pSettings->editor().gutterDigitsCount()); gutter().setDigitCount(pSettings->editor().gutterDigitsCount());
gutter().setVisible(pSettings->editor().gutterVisible()); gutter().setVisible(pSettings->editor().gutterVisible());

View File

@ -1031,7 +1031,6 @@ void MainWindow::applySettings()
QFont font(pSettings->environment().interfaceFont()); QFont font(pSettings->environment().interfaceFont());
font.setPixelSize(pointToPixel(pSettings->environment().interfaceFontSize())); font.setPixelSize(pointToPixel(pSettings->environment().interfaceFontSize()));
font.setStyleStrategy(QFont::PreferAntialias); font.setStyleStrategy(QFont::PreferAntialias);
font.setHintingPreference(QFont::PreferNoHinting);
qApp->setFont(font); qApp->setFont(font);
this->setFont(font); this->setFont(font);
for (QWidget* p:findChildren<QWidget*>()) { for (QWidget* p:findChildren<QWidget*>()) {
@ -1053,7 +1052,6 @@ void MainWindow::applySettings()
QFont caseEditorFont(pSettings->executor().caseEditorFontName()); QFont caseEditorFont(pSettings->executor().caseEditorFontName());
caseEditorFont.setPixelSize(pointToPixel(pSettings->executor().caseEditorFontSize())); caseEditorFont.setPixelSize(pointToPixel(pSettings->executor().caseEditorFontSize()));
font.setStyleStrategy(QFont::PreferAntialias); font.setStyleStrategy(QFont::PreferAntialias);
font.setHintingPreference(QFont::PreferNoHinting);
ui->txtProblemCaseInput->setFont(caseEditorFont); ui->txtProblemCaseInput->setFont(caseEditorFont);
ui->lblProblemCaseInput->setFont(caseEditorFont); ui->lblProblemCaseInput->setFont(caseEditorFont);
ui->txtProblemCaseOutput->setFont(caseEditorFont); ui->txtProblemCaseOutput->setFont(caseEditorFont);

View File

@ -104,7 +104,6 @@ void CPUDialog::updateDPI(float dpi)
QFont font(pSettings->environment().interfaceFont()); QFont font(pSettings->environment().interfaceFont());
font.setPixelSize(pointToPixel(pSettings->environment().interfaceFontSize(),dpi)); font.setPixelSize(pointToPixel(pSettings->environment().interfaceFontSize(),dpi));
font.setStyleStrategy(QFont::PreferAntialias); font.setStyleStrategy(QFont::PreferAntialias);
font.setHintingPreference(QFont::PreferNoHinting);
setFont(font); setFont(font);
for (QWidget* p:findChildren<QWidget*>()) { for (QWidget* p:findChildren<QWidget*>()) {
if (p!=ui->txtCode) if (p!=ui->txtCode)
@ -152,7 +151,6 @@ void CPUDialog::resetEditorFont(float dpi)
f.setFamilies(pSettings->editor().fontFamiliesWithControlFont()); f.setFamilies(pSettings->editor().fontFamiliesWithControlFont());
f.setPixelSize(pointToPixel(pSettings->editor().fontSize(),dpi)); f.setPixelSize(pointToPixel(pSettings->editor().fontSize(),dpi));
f.setStyleStrategy(QFont::PreferAntialias); f.setStyleStrategy(QFont::PreferAntialias);
f.setHintingPreference(QFont::PreferNoHinting);
ui->txtCode->setFont(f); ui->txtCode->setFont(f);
} }

View File

@ -61,7 +61,6 @@ QSynEdit::QSynEdit(QWidget *parent) : QAbstractScrollArea(parent),
mPaintLock = 0; mPaintLock = 0;
mFontDummy = QFont("monospace",14); mFontDummy = QFont("monospace",14);
mFontDummy.setStyleStrategy(QFont::PreferAntialias); mFontDummy.setStyleStrategy(QFont::PreferAntialias);
mFontDummy.setHintingPreference(QFont::PreferNoHinting);
mDocument = std::make_shared<Document>(mFontDummy, this); mDocument = std::make_shared<Document>(mFontDummy, this);
mMouseMoved = false; mMouseMoved = false;