Skip to content

Commit 1f3aa07

Browse files
committed
fix #105, crash if open a custom option includes a font that doesn't exist
1 parent a30fd5c commit 1f3aa07

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,8 @@ class LabelPlusInput extends GenericUI {
611611
pnl.setFontCheckBox.value = false;
612612
} else {
613613
pnl.setFontCheckBox.value = true;
614-
pnl.font.setFont(opts.font, opts.fontSize);
614+
pnl.font.family.selection = pnl.font.family.find(opts.font);
615+
pnl.font.fontSize.text = opts.fontSize;
615616
}
616617
Emit(pnl.setFontCheckBox.onClick);
617618
}

0 commit comments

Comments
 (0)