fix font setup in document command

This commit is contained in:
Jörg Prante 2023-08-07 18:14:51 +02:00
parent 9eeebfac01
commit ddb5db7b84
2 changed files with 10 additions and 13 deletions

View file

@ -239,7 +239,6 @@ public class Document implements Element, Closeable, RenderListener {
return PDType0Font.load(pdDocument, openTypeFont, true); return PDType0Font.load(pdDocument, openTypeFont, true);
} }
public Font getFont(String name) { public Font getFont(String name) {
return fonts.get(name); return fonts.get(name);
} }

View file

@ -71,7 +71,6 @@ public class DocumentCommand implements Command {
} else { } else {
document.setModificationDate(instant); document.setModificationDate(instant);
} }
if (settings.containsSetting("font")) {
String[] fonts = settings.getAsArray("font"); String[] fonts = settings.getAsArray("font");
for (String font : fonts) { for (String font : fonts) {
switch (font) { switch (font) {
@ -84,7 +83,6 @@ public class DocumentCommand implements Command {
case "sourcesans" -> document.registerSourceSansFont(); case "sourcesans" -> document.registerSourceSansFont();
} }
} }
}
state.getElements().push(document); state.getElements().push(document);
engine.executeElements(settings); engine.executeElements(settings);
} }