Add option to enable/disable tracking in nativetext manual test
Only applies to Qt for now, as I didn't find a way to toggle this for CoreText. Change-Id: I79d3da1cf968bd9e5ae756f7633a0c58a227ffd2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
parent
32890793ca
commit
9afc899a30
@ -246,8 +246,19 @@ public:
|
||||
}
|
||||
});
|
||||
controls->addWidget(subpixelAAButton);
|
||||
controls->addStretch();
|
||||
|
||||
auto *trakButton = new QCheckBox("Tracking (trak)");
|
||||
connect(trakButton, &QCheckBox::checkStateChanged, [&](auto state) {
|
||||
for (TextRenderer *renderer : m_previews->findChildren<TextRenderer *>()) {
|
||||
QFont font = renderer->font();
|
||||
font.setFeature("trak", state == Qt::Checked);
|
||||
renderer->setFont(font);
|
||||
}
|
||||
});
|
||||
trakButton->checkStateChanged(trakButton->checkState());
|
||||
controls->addWidget(trakButton);
|
||||
|
||||
controls->addStretch();
|
||||
mainLayout->addLayout(controls);
|
||||
|
||||
mainLayout->setSizeConstraint(QLayout::SetFixedSize);
|
||||
|
Loading…
x
Reference in New Issue
Block a user