Fixed Leading of the font can be set to negative value

This commit is contained in:
Jindra Petřík
2022-10-29 00:27:35 +02:00
parent b8cf60c442
commit 5d918104ab
2 changed files with 2 additions and 1 deletions

View File

@@ -677,7 +677,7 @@ public class FontPanel extends JPanel {
int ascent = Integer.parseInt(fontAscentTextField.getText());
int descent = Integer.parseInt(fontDescentTextField.getText());
int leading = Integer.parseInt(fontLeadingTextField.getText());
if (ascent < 0 || descent < 0 || leading < 0) {
if (ascent < 0 || descent < 0) {
return;
}
fontTag.setAscent(ascent);