Reset font style name after loading fonts
This commit is contained in:
@@ -445,6 +445,7 @@ def fontMatcher(font: QFont) -> QFont:
|
|||||||
default Qt font matching algorithm doesn't handle well changing
|
default Qt font matching algorithm doesn't handle well changing
|
||||||
application fonts at runtime.
|
application fonts at runtime.
|
||||||
"""
|
"""
|
||||||
|
font.setStyleName(None) # Make sure no font style name is set from config, see #2502
|
||||||
info = QFontInfo(font)
|
info = QFontInfo(font)
|
||||||
if (famRequest := font.family()) != (famActual := info.family()):
|
if (famRequest := font.family()) != (famActual := info.family()):
|
||||||
logger.warning("Font mismatch: Requested '%s', but got '%s'", famRequest, famActual)
|
logger.warning("Font mismatch: Requested '%s', but got '%s'", famRequest, famActual)
|
||||||
|
|||||||
Reference in New Issue
Block a user