Skip to content

Commit

Permalink
set fontengine=directwrite for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
igorkorsukov committed Aug 6, 2024
1 parent 782c943 commit 9d0732e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/app/configs/qt_win.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
Prefix=./

[Platforms]
WindowsArguments = fontengine=freetype
#WindowsArguments = fontengine=freetype
WindowsArguments = fontengine=directwrite
5 changes: 3 additions & 2 deletions src/framework/ui/api/themeapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,13 +388,14 @@ void ThemeApi::setupUiFonts()
{ &m_titleBoldFont, { QFont::DemiBold, FontSizeType::TITLE } },
};

QString family = QString::fromStdString(configuration()->fontFamily());
for (QFont* font : fonts.keys()) {
std::string family = configuration()->fontFamily();

int size = configuration()->fontSize(fonts[font].sizeType);
QFont::Weight weight = fonts[font].weight;

font->setPixelSize(size);
font->setFamily(QString::fromStdString(family));
font->setFamily(family);
font->setWeight(weight);
}

Expand Down

0 comments on commit 9d0732e

Please sign in to comment.