pbwest 2002/06/26 08:19:27
Modified: src/org/apache/fop/fo/expr Tag: FOP_0-20-0_Alt-Design
PropertyParser.java
Log:
Support code for system-font function
Revision Changes Path
No revision
No revision
1.5.2.4 +13 -3 xml-fop/src/org/apache/fop/fo/expr/PropertyParser.java
Index: PropertyParser.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/expr/PropertyParser.java,v
retrieving revision 1.5.2.3
retrieving revision 1.5.2.4
diff -u -r1.5.2.3 -r1.5.2.4
--- PropertyParser.java 24 Jun 2002 22:31:58 -0000 1.5.2.3
+++ PropertyParser.java 26 Jun 2002 15:19:27 -0000 1.5.2.4
@@ -10,6 +10,7 @@
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 @@
// 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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]