org.apache.fop.fonts
Class FontUtil
java.lang.Object
org.apache.fop.fonts.FontUtil
public class FontUtil
extends java.lang.Object
Font utilities.
static int | parseCSS2FontWeight(String text) - Parses an CSS2 (SVG and XSL-FO) font weight (normal, bold, 100-900) to
an integer.
|
static String | stripWhiteSpace(String s) - Removes all white space from a string (used primarily for font names)
|
parseCSS2FontWeight
public static int parseCSS2FontWeight(String text)
Parses an CSS2 (SVG and XSL-FO) font weight (normal, bold, 100-900) to
an integer.
See http://www.w3.org/TR/REC-CSS2/fonts.html#propdef-font-weight
TODO: Implement "lighter" and "bolder".
text
- the font weight to parse
- an integer between 100 and 900 (100, 200, 300...)
stripWhiteSpace
public static String stripWhiteSpace(String s)
Removes all white space from a string (used primarily for font names)
Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.