Skip to content

Commit 227e30f

Browse files
author
Joris Schellekens
committed
added non-breaking-space in TextRenderer#isGlyphPartOfWordForHyphenation
DEVSIX-1849
1 parent 866eadb commit 227e30f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

layout/src/main/java/com/itextpdf/layout/renderer/TextRenderer.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1282,7 +1282,9 @@ private int[] getWordBoundsForHyphenation(GlyphLine text, int leftTextPos, int r
12821282

12831283
private boolean isGlyphPartOfWordForHyphenation(Glyph g) {
12841284
return Character.isLetter((char) g.getUnicode()) ||
1285-
Character.isDigit((char) g.getUnicode()) || '\u00ad' == g.getUnicode();
1285+
Character.isDigit((char) g.getUnicode()) ||
1286+
'\u00ad' == g.getUnicode() ||
1287+
'\u00a0' == g.getUnicode();
12861288
}
12871289

12881290
private void updateFontAndText() {

0 commit comments

Comments
 (0)