Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: keep GDI fontengine on Windows for now #5710

Merged
merged 4 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
- Dev: Fixed some compiler warnings. (#5672)
- Dev: Unified parsing of historic and live IRC messages. (#5678)
- Dev: 7TV's `entitlement.reset` is now explicitly ignored. (#5685)
- Dev: Qt 6.8 and later now default to the GDI fontengine. (#5710)

## 2.5.1

Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ option(BUILD_TRANSLATIONS "" OFF)
option(BUILD_SHARED_LIBS "" OFF)
option(CHATTERINO_LTO "Enable LTO for all targets" OFF)
option(CHATTERINO_PLUGINS "Enable ALPHA plugin support in Chatterino" OFF)
option(CHATTERINO_USE_GDI_FONTENGINE "Use the legacy GDI fontengine instead of the new DirectWrite one on Windows (Qt 6.8.0 and later)" ON)

option(CHATTERINO_UPDATER "Enable update checks" ON)
mark_as_advanced(CHATTERINO_UPDATER)
Expand Down
9 changes: 9 additions & 0 deletions cmake/resources/generate_resources.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@ if (WIN32)
list(APPEND RES_AUTOGEN_FILES "${CMAKE_BINARY_DIR}/autogen/windows.rc")
endif ()

set(WINDOWS_ARGUMENTS "@Invalid()") # empty QVariant() in QSettings
if (CHATTERINO_USE_GDI_FONTENGINE AND Qt${MAJOR_QT_VERSION}_VERSION VERSION_GREATER_EQUAL "6.8.0")
message(STATUS "Using legacy GDI fontengine")
set(WINDOWS_ARGUMENTS "fontengine=gdi")
endif ()

configure_file("${CMAKE_CURRENT_LIST_DIR}/qt.conf.in" "${CMAKE_SOURCE_DIR}/resources/qt.conf")
list(APPEND RES_AUTOGEN_FILES "${CMAKE_SOURCE_DIR}/resources/qt.conf")

list(APPEND RES_AUTOGEN_FILES
"${CMAKE_SOURCE_DIR}/resources/resources_autogenerated.qrc"
"${CMAKE_BINARY_DIR}/autogen/ResourcesAutogen.cpp"
Expand Down
2 changes: 2 additions & 0 deletions cmake/resources/qt.conf.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Platforms]
WindowsArguments = ${WINDOWS_ARGUMENTS}
3 changes: 3 additions & 0 deletions cmake/resources/resources_autogenerated.qrc.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@
<qresource prefix="/">
@RES_RESOURCES_CONTENT@
</qresource>
<qresource prefix="/qt/etc">
<file>qt.conf</file>
</qresource>
</RCC>
1 change: 1 addition & 0 deletions resources/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
linuxinstall
/qt.conf
2 changes: 0 additions & 2 deletions resources/qt.conf

This file was deleted.

5 changes: 0 additions & 5 deletions resources/resources.qrc

This file was deleted.

2 changes: 0 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -740,8 +740,6 @@ set(SOURCE_FILES
widgets/splits/SplitInput.hpp
widgets/splits/SplitOverlay.cpp
widgets/splits/SplitOverlay.hpp

${CMAKE_SOURCE_DIR}/resources/resources.qrc
)

if (APPLE)
Expand Down
Loading