summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/graph
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-03-28 04:47:09 +0200
committerSven Gothel <[email protected]>2023-03-28 04:47:09 +0200
commitad6349be75698cc2aba19e3cade426e093f58f9c (patch)
tree5e2d87282d85c0eae769f10e10b8be168525b507 /src/jogl/classes/jogamp/graph
parente7e49f80af493b5bed7ea29fbc7fb2c7155e1d93 (diff)
Graph Font: TypecastFont: getGlyphBoundsFU() + processString(): If isWhitespace() continue w/ AABBox resize, but don't earmark this (whitespace) glyph for next left_glyph (kerning).
Diffstat (limited to 'src/jogl/classes/jogamp/graph')
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java
index dcf8ce56c..1bc0fe0f4 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java
@@ -329,9 +329,7 @@ class TypecastFont implements Font {
left_glyph = null; // break kerning
continue;
} else if( glyph.isWhiteSpace() ) { // covers 'space' and all non-contour symbols
- advanceTotal += glyph.getAdvanceFU();
left_glyph = null; // break kerning
- continue;
}
if( null != left_glyph ) {
advanceTotal += left_glyph.getKerningFU(glyph_id);
@@ -340,7 +338,9 @@ class TypecastFont implements Font {
res.resize(temp1.transform(glyph.getBoundsFU(), temp_box));
advanceTotal += glyph.getAdvanceFU();
- left_glyph = glyph;
+ if( !glyph.isWhiteSpace() ) {
+ left_glyph = glyph;
+ }
}
}
return res;
@@ -419,7 +419,9 @@ class TypecastFont implements Font {
res.resize(temp1.transform(glyphShape.getBounds(), temp_box));
visitor.visit(character, glyph, temp1);
advanceTotal += glyph.getAdvance();
- left_glyph = glyph;
+ if( !glyph.isWhiteSpace() ) {
+ left_glyph = glyph;
+ }
}
}
return res;