From 045fc2577c841e6cc1bdd3e60031c9bcba38ff0e Mon Sep 17 00:00:00 2001 From: "Andreas L. Delmelle" Date: Sun, 12 Feb 2006 21:07:19 +0000 Subject: [PATCH] Slight correction: single quoted font-family names not properly handled git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@377242 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/fop/fo/properties/FontShorthandProperty.java | 6 ++++++ test/fotree/testcases/font-shorthand-test.fo | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/java/org/apache/fop/fo/properties/FontShorthandProperty.java b/src/java/org/apache/fop/fo/properties/FontShorthandProperty.java index 75101c770..3d1fa6604 100644 --- a/src/java/org/apache/fop/fo/properties/FontShorthandProperty.java +++ b/src/java/org/apache/fop/fo/properties/FontShorthandProperty.java @@ -101,6 +101,11 @@ public class FontShorthandProperty extends ListProperty { /* no list, just a single name * (or first name in the list) */ + if (quoteIndex != -1) { + /* a single name, quoted + */ + fromIndex = quoteIndex; + } m = FObj.getPropertyMakerFor(PROP_IDS[1]); prop = m.make(propertyList, specVal.substring(fromIndex), fo); newProp.addProperty(prop, 1); @@ -112,6 +117,7 @@ public class FontShorthandProperty extends ListProperty { * fromIndex = index of the first quote */ fromIndex = quoteIndex; + quoteIndex = -1; } else { fromIndex = value.lastIndexOf(' ', commaIndex) + 1; } diff --git a/test/fotree/testcases/font-shorthand-test.fo b/test/fotree/testcases/font-shorthand-test.fo index 345161cf8..e940e08d7 100644 --- a/test/fotree/testcases/font-shorthand-test.fo +++ b/test/fotree/testcases/font-shorthand-test.fo @@ -23,10 +23,10 @@ - - + + - + -- 2.39.5