fix font setup in document command

This commit is contained in:
Jörg Prante 2023-08-07 18:14:51 +02:00
parent 53a27c5792
commit 6f432f7b59
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);
}
public Font getFont(String name) {
return fonts.get(name);
}

View file

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