This commit is contained in:
jrkb 2023-06-03 17:16:31 +02:00
parent 7d1a43cb5e
commit 036a028ecd

View file

@ -148,6 +148,9 @@ bool Atlas::generate(bool useCache,
msdf_atlas::FontGeometry _fontGeometry(&variationGlyphs); msdf_atlas::FontGeometry _fontGeometry(&variationGlyphs);
fontGeometry = _fontGeometry; fontGeometry = _fontGeometry;
// this function silently fails, if variation is not available
// which is absolutely fine, and allows to set a random
// variation step for non-variable fonts.
msdfgen::setFontVariationAxis(ft, msdfgen::setFontVariationAxis(ft,
font, font,
variation.name.c_str(), variation.name.c_str(),