From 85995ed974c8e5b0170a360d2ad5653afc9d5dc9 Mon Sep 17 00:00:00 2001 From: Peter Bernard West Date: Wed, 26 Jun 2002 15:19:27 +0000 Subject: [PATCH] Support code for system-font function 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 | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/org/apache/fop/fo/expr/PropertyParser.java b/src/org/apache/fop/fo/expr/PropertyParser.java index 017def067..0a0a49e4b 100644 --- a/src/org/apache/fop/fo/expr/PropertyParser.java +++ b/src/org/apache/fop/fo/expr/PropertyParser.java @@ -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 -- 2.39.5