public final class FontUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
guessStyle(String fontName)
Guesses the font style of a font using its name.
|
static int |
guessWeight(String fontName)
Guesses the font weight of a font using its name.
|
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 str)
Removes all white space from a string (used primarily for font names)
|
public static int parseCSS2FontWeight(String text)
text - the font weight to parsepublic static String stripWhiteSpace(String str)
str - the stringpublic static String guessStyle(String fontName)
fontName - the font namepublic static int guessWeight(String fontName)
fontName - the font nameCopyright © 2025 Apache Software Foundation. All rights reserved.