public final class SvgTextUtil extends Object
Modifier and Type | Method and Description |
---|---|
static String |
filterReferenceValue(String name)
The reference value may contain a hashtag character or 'url' designation and this method will filter them.
|
static boolean |
isOnlyWhiteSpace(String s)
Check if the String is only composed of whitespace characters
|
static void |
processWhiteSpace(TextSvgBranchRenderer root, boolean isLeadingElement)
Process the whitespace inside the Text Tree.
|
static float |
resolveFontSize(ISvgTextNodeRenderer renderer, float parentFontSize)
Resolve the font size stored inside the passed renderer
|
static String |
trimLeadingWhitespace(String toTrim)
Trim all the leading whitespace characters from the passed string
|
static String |
trimTrailingWhitespace(String toTrim)
Trim all the trailing whitespace characters from the passed string
|
public static String trimLeadingWhitespace(String toTrim)
toTrim
- string to trim
public static String trimTrailingWhitespace(String toTrim)
toTrim
- string to trim
public static void processWhiteSpace(TextSvgBranchRenderer root, boolean isLeadingElement)
root
- root of the text-renderer subtree
isLeadingElement
- true if this element is a leading element(either the first child or the first element after an absolute position change)
public static boolean isOnlyWhiteSpace(String s)
s
- string to check
public static float resolveFontSize(ISvgTextNodeRenderer renderer, float parentFontSize)
renderer
- renderer containing the font size declaration
parentFontSize
- parent font size to fall back on if the renderer does not contain a font size declarations or if the stored declaration is invalid
Copyright © 1998–2023 iText Group NV. All rights reserved.