]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Support code for system-font function
authorPeter Bernard West <pbwest@apache.org>
Wed, 26 Jun 2002 15:19:27 +0000 (15:19 +0000)
committerPeter Bernard West <pbwest@apache.org>
Wed, 26 Jun 2002 15:19:27 +0000 (15:19 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@194920 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/fo/expr/PropertyParser.java

index 017def0676c2b9f5889bd58fd0703d417feb6ece..0a0a49e4b64c8e32129b5ff23ea7ee21594cb602 100644 (file)
@@ -10,6 +10,7 @@ package org.apache.fop.fo.expr;
 import org.apache.fop.fo.PropertyConsts;
 import org.apache.fop.fo.Properties;
 import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.expr.SystemFontFunction;
 
 import org.apache.fop.fo.expr.PropertyValue;
 import org.apache.fop.fo.expr.PropertyValueList;
@@ -470,8 +471,17 @@ public class PropertyParser extends PropertyTokenizer {
             // Font function
             else if (currentTokenValue.equals("system-font")) {
                 PropertyValue[] args = parseArgs(1, 2);
-                throw new PropertyException
-                        ("system-font function is not supported.");
+                if (args.length == 1) {
+                    prop = SystemFontFunction.systemFontCharacteristic
+                            (property,
+                             ((StringType)args[0]).getString());
+                } else {
+                    // 2 args
+                    prop = SystemFontFunction.systemFontCharacteristic
+                            (property,
+                             ((StringType)args[0]).getString(),
+                             ((StringType)args[0]).getString());
+                }
             }
 
             // Property value functions