Package com.itextpdf.layout.renderer
Class TextPreprocessingUtil
- java.lang.Object
-
- com.itextpdf.layout.renderer.TextPreprocessingUtil
-
public final class TextPreprocessingUtil extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static intAMOUNT_OF_SPACE_IN_TAB(package private) static intNON_MONO_SPACE_ENSP_WIDTH(package private) static intNON_MONO_SPACE_THINSP_WIDTH
-
Constructor Summary
Constructors Modifier Constructor Description privateTextPreprocessingUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.lang.IntegercalculateXAdvancement(int spaceWidth, boolean isMonospaceFont, Glyph glyph)static GlyphLinereplaceSpecialWhitespaceGlyphs(GlyphLine line, PdfFont font)Replaces special whitespace glyphs to new whitespace ' ' glyph that has custom width.
-
-
-
Field Detail
-
NON_MONO_SPACE_ENSP_WIDTH
static final int NON_MONO_SPACE_ENSP_WIDTH
- See Also:
- Constant Field Values
-
NON_MONO_SPACE_THINSP_WIDTH
static final int NON_MONO_SPACE_THINSP_WIDTH
- See Also:
- Constant Field Values
-
AMOUNT_OF_SPACE_IN_TAB
static final int AMOUNT_OF_SPACE_IN_TAB
- See Also:
- Constant Field Values
-
-
Method Detail
-
replaceSpecialWhitespaceGlyphs
public static GlyphLine replaceSpecialWhitespaceGlyphs(GlyphLine line, PdfFont font)
Replaces special whitespace glyphs to new whitespace ' ' glyph that has custom width. Special whitespace glyphs are symbols such as ' ', ' ', ' ' and '\t'.- Parameters:
line- the string for preprocessingfont- the font that will be used when displaying the string- Returns:
- old line with new special whitespace glyphs
-
calculateXAdvancement
private static java.lang.Integer calculateXAdvancement(int spaceWidth, boolean isMonospaceFont, Glyph glyph)
-
-