File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -261,8 +261,7 @@ bool OptionsModel::Init(bilingual_str& error)
261261 } else if (GUIUtil::fontsLoaded ()) {
262262 int raw_weight = SettingToInt (node ().getPersistentSetting (" font-weight-normal" ), GUIUtil::weightToArg (GUIUtil::g_font_defaults.weight_normal ));
263263 QFont::Weight weight;
264- GUIUtil::weightFromArg (raw_weight, weight);
265- if (!GUIUtil::isSupportedWeight (weight)) {
264+ if (!GUIUtil::weightFromArg (raw_weight, weight) || !GUIUtil::isSupportedWeight (weight)) {
266265 weight = GUIUtil::supportedWeightFromIndex (GetFallbackWeightIndex (/* is_bold=*/ false ));
267266 node ().forceSetting (" font-weight-normal" , GUIUtil::weightToArg (weight));
268267 }
@@ -274,8 +273,7 @@ bool OptionsModel::Init(bilingual_str& error)
274273 } else if (GUIUtil::fontsLoaded ()) {
275274 QFont::Weight weight;
276275 int raw_weight = SettingToInt (node ().getPersistentSetting (" font-weight-bold" ), GUIUtil::weightToArg (GUIUtil::g_font_defaults.weight_bold ));
277- GUIUtil::weightFromArg (raw_weight, weight);
278- if (!GUIUtil::isSupportedWeight (weight)) {
276+ if (!GUIUtil::weightFromArg (raw_weight, weight) || !GUIUtil::isSupportedWeight (weight)) {
279277 weight = GUIUtil::supportedWeightFromIndex (GetFallbackWeightIndex (/* is_bold=*/ true ));
280278 node ().forceSetting (" font-weight-bold" , GUIUtil::weightToArg (weight));
281279 }
You can’t perform that action at this time.
0 commit comments