From 0ff3bf99d6477256181507f0107852f08ed28b35 Mon Sep 17 00:00:00 2001 From: Alexander Dyuzhev Date: Sun, 16 Jul 2023 16:14:17 +0300 Subject: [PATCH] fonts extraction from font-family issue fixed, #177 --- src/main/java/org/metanorma/fop/SourceXMLDocument.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/metanorma/fop/SourceXMLDocument.java b/src/main/java/org/metanorma/fop/SourceXMLDocument.java index c1762c9..6200b27 100644 --- a/src/main/java/org/metanorma/fop/SourceXMLDocument.java +++ b/src/main/java/org/metanorma/fop/SourceXMLDocument.java @@ -158,13 +158,13 @@ public List 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); }