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 trimpublic static String trimTrailingWhitespace(String toTrim)
toTrim - string to trimpublic static void processWhiteSpace(TextSvgBranchRenderer root, boolean isLeadingElement)
root - root of the text-renderer subtreeisLeadingElement - 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 checkpublic static float resolveFontSize(ISvgTextNodeRenderer renderer, float parentFontSize)
renderer - renderer containing the font size declarationparentFontSize - parent font size to fall back on if the renderer does not contain a font size declarations or if the stored declaration is invalidCopyright © 1998–2020 iText Group NV. All rights reserved.