fix: set vaxes when building font
This commit is contained in:
parent
77ad30a0ef
commit
9877bea91b
1 changed files with 2 additions and 0 deletions
|
|
@ -21,7 +21,9 @@ QFont FontStyleBase::buildFont(const FontConfig* cfg, const QString& fallbackFam
|
||||||
QFont font;
|
QFont font;
|
||||||
font.setFamily(cfg->family().isEmpty() ? fallbackFamily : cfg->family());
|
font.setFamily(cfg->family().isEmpty() ? fallbackFamily : cfg->family());
|
||||||
font.setPointSize(cfg->size() > 0 ? cfg->size() : 1);
|
font.setPointSize(cfg->size() > 0 ? cfg->size() : 1);
|
||||||
|
font.setVariableAxis("opsz", static_cast<float>(font.pointSize()));
|
||||||
font.setWeight(QFont::Weight(cfg->weight()));
|
font.setWeight(QFont::Weight(cfg->weight()));
|
||||||
|
font.setVariableAxis("wght", font.weight());
|
||||||
font.setItalic(cfg->italic());
|
font.setItalic(cfg->italic());
|
||||||
|
|
||||||
const auto axes = cfg->vaxes();
|
const auto axes = cfg->vaxes();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue