Reset font style name after loading fonts

This commit is contained in:
Veronica Berglyd Olsen
2025-08-21 22:41:58 +02:00
parent 3c7510d74f
commit 65d2a3b313
+1
View File
@@ -445,6 +445,7 @@ def fontMatcher(font: QFont) -> QFont:
default Qt font matching algorithm doesn't handle well changing
application fonts at runtime.
"""
font.setStyleName(None) # Make sure no font style name is set from config, see #2502
info = QFontInfo(font)
if (famRequest := font.family()) != (famActual := info.family()):
logger.warning("Font mismatch: Requested '%s', but got '%s'", famRequest, famActual)