Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.9.0
-
None
Description
Test program:
from PySide6.QtWidgets import QApplication, QVBoxLayout, QWidget, QLabel from PySide6.QtGui import QFont import sys def main(): app = QApplication(sys.argv) window = QWidget() box = QVBoxLayout() label1= QLabel("setWeight: The quick brown fox jumps over the lazy dog") font1 = QFont("Cantarell", 12) font1.setWeight(QFont.Bold) label1.setFont(font1) label2 = QLabel("setVariableAxis: The quick brown fox jumps over the lazy dog") font2 = QFont("Cantarell", 12) font2.setVariableAxis(QFont.Tag("wght"), float(QFont.Bold)) label2.setFont(font2) box.addWidget(label1) box.addWidget(label2) window.setLayout(box) window.show() sys.exit(app.exec()) if __name__ == "__main__": main()
Screenshot:
I would expect similar rendering for both case, but the setWeight case looks like synthesized bold on top of wght=700 variant.