public class FontUtil
extends java.lang.Object
Constructor and Description |
---|
FontUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
guessStyle(java.lang.String fontName)
Guesses the font style of a font using its name.
|
static int |
guessWeight(java.lang.String fontName)
Guesses the font weight of a font using its name.
|
static int |
parseCSS2FontWeight(java.lang.String text)
Parses an CSS2 (SVG and XSL-FO) font weight (normal, bold, 100-900) to
an integer.
|
static java.lang.String |
stripWhiteSpace(java.lang.String str)
Removes all white space from a string (used primarily for font names)
|
public static int parseCSS2FontWeight(java.lang.String text)
text
- the font weight to parsepublic static java.lang.String stripWhiteSpace(java.lang.String str)
str
- the stringpublic static java.lang.String guessStyle(java.lang.String fontName)
fontName
- the font namepublic static int guessWeight(java.lang.String fontName)
fontName
- the font nameCopyright 1999-2010 The Apache Software Foundation. All Rights Reserved.