Skip to content

Commit

Permalink
fonts extraction from font-family issue fixed, #177
Browse files Browse the repository at this point in the history
  • Loading branch information
Intelligent2013 committed Jul 16, 2023
1 parent efa5fef commit 0ff3bf9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/org/metanorma/fop/SourceXMLDocument.java
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,13 @@ public List<String> getDocumentFonts() {
try {
Attr attr = (Attr) nList.item(i);
String attrText = attr.getNodeValue();
attrText = attrText.substring(attrText.indexOf("font-family"))
.substring(attrText.indexOf(":") + 1);
attrText = attrText.substring(attrText.indexOf("font-family"));
attrText = attrText.substring(attrText.indexOf(":") + 1);
if (attrText.indexOf(";") != -1) {
attrText = attrText.substring(0, attrText.indexOf(";"));
}
for (String fname: attrText.split(",")) {
fname = fname.trim();
fname = fname.trim().replace("'","");
if (!documentFontList.contains(fname)) {
documentFontList.add(fname);
}
Expand Down

0 comments on commit 0ff3bf9

Please sign in to comment.