Package com.itextpdf.layout.renderer
Class TextPreprocessingUtil
java.lang.Object
com.itextpdf.layout.renderer.TextPreprocessingUtil
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final int
(package private) static final int
(package private) static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Integer
calculateXAdvancement
(int spaceWidth, boolean isMonospaceFont, Glyph glyph) static GlyphLine
replaceSpecialWhitespaceGlyphs
(GlyphLine line, PdfFont font) Replaces special whitespace glyphs to new whitespace ' ' glyph that has custom width.
-
Field Details
-
NON_MONO_SPACE_ENSP_WIDTH
static final int NON_MONO_SPACE_ENSP_WIDTH- See Also:
-
NON_MONO_SPACE_THINSP_WIDTH
static final int NON_MONO_SPACE_THINSP_WIDTH- See Also:
-
AMOUNT_OF_SPACE_IN_TAB
static final int AMOUNT_OF_SPACE_IN_TAB- See Also:
-
-
Constructor Details
-
TextPreprocessingUtil
private TextPreprocessingUtil()
-
-
Method Details
-
replaceSpecialWhitespaceGlyphs
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
-