Fix LabelWidgets randomly being shadowed

This commit is contained in:
Kae 2023-08-18 18:32:29 +10:00
parent 49147c8be5
commit 572291047f
3 changed files with 4 additions and 2 deletions

View File

@ -2,7 +2,7 @@
"paneLayout" : {
"voiceLabel" : {
"type" : "label",
"position" : [119, 187],
"position" : [119, 186],
"hAnchor" : "mid",
"value" : "VOICE"
},

View File

@ -274,6 +274,7 @@ void CanvasWidget::renderText(Vec2F const& renderingOffset, String const& s, Tex
context.setDefaultLineSpacing();
context.setDefaultFont();
context.setFontMode(FontMode::Normal);
context.setFontProcessingDirectives("");
}

View File

@ -14,7 +14,8 @@ LabelWidget::LabelWidget(String text,
m_hAnchor(hAnchor),
m_vAnchor(vAnchor),
m_wrapWidth(move(wrapWidth)),
m_lineSpacing(move(lineSpacing)) {
m_lineSpacing(move(lineSpacing)),
m_fontMode(FontMode::Normal) {
auto assets = Root::singleton().assets();
auto fontConfig = assets->json("/interface.config:font");
m_fontSize = fontConfig.getInt("baseSize");