summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/graph/font
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-03-28 02:41:30 +0200
committerSven Gothel <[email protected]>2023-03-28 02:41:30 +0200
commit114cc7be0f43a6cf2540caa0ed47948d7cade54f (patch)
tree81d3299240789be44c4f82eb1c345e72931e9bd1 /src/jogl/classes/jogamp/graph/font
parentf7125f6bb2db418064a170ae42466e13b8f51f70 (diff)
Graph Font.GlyphVisitor*: Pass 'char symbol' to visitor, passing full text-processing information
Diffstat (limited to 'src/jogl/classes/jogamp/graph/font')
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java
index 7dc20e47f..dcf8ce56c 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java
@@ -31,8 +31,6 @@ import com.jogamp.common.util.IntObjectHashMap;
import com.jogamp.graph.curve.OutlineShape;
import com.jogamp.graph.font.Font;
import com.jogamp.graph.font.FontFactory;
-import com.jogamp.graph.geom.Vertex;
-import com.jogamp.graph.geom.Vertex.Factory;
import com.jogamp.graph.geom.plane.AffineTransform;
import com.jogamp.opengl.math.geom.AABBox;
@@ -359,7 +357,7 @@ class TypecastFont implements Font {
}
final Font.GlyphVisitor visitor = new Font.GlyphVisitor() {
@Override
- public final void visit(final Font.Glyph shape, final AffineTransform t) {
+ public final void visit(final char symbol, final Font.Glyph shape, final AffineTransform t) {
// nop
} };
return processString(visitor, transform, string);
@@ -419,7 +417,7 @@ class TypecastFont implements Font {
}
temp1.translate(advanceTotal, y, temp2);
res.resize(temp1.transform(glyphShape.getBounds(), temp_box));
- visitor.visit(glyph, temp1);
+ visitor.visit(character, glyph, temp1);
advanceTotal += glyph.getAdvance();
left_glyph = glyph;
}
@@ -439,7 +437,7 @@ class TypecastFont implements Font {
if( '\n' != character ) {
final Glyph glyph = getGlyph(getGlyphID(character));
if( null != glyph.getShape() ) { // also covers 'space' and all non-contour symbols
- visitor.visit(glyph);
+ visitor.visit(character, glyph);
}
}
}