aboutsummaryrefslogtreecommitdiffstats
path: root/src/demos
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-09-24 16:51:37 +0200
committerSven Gothel <[email protected]>2023-09-24 16:51:37 +0200
commit9db8aeaf345a373029bd497c5125f8471aecbd4e (patch)
tree81023532414d17b6c7a81cd83636ac17b77b00d2 /src/demos
parenta8de1673ca83475227fcc914fd94a9a0be1cba79 (diff)
Graph Font Tests: Fix missing codepoint -> GlyphID conversion
Diffstat (limited to 'src/demos')
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/TextRendererGLELBase.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/demos/com/jogamp/opengl/demos/graph/TextRendererGLELBase.java b/src/demos/com/jogamp/opengl/demos/graph/TextRendererGLELBase.java
index 1f89fb40e..b515db2a9 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/TextRendererGLELBase.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/TextRendererGLELBase.java
@@ -245,7 +245,7 @@ public abstract class TextRendererGLELBase implements GLEventListener {
final float sxy = pixelScale * pixelSize;
final int newLineCount = TextRegionUtil.getCharCount(text, '\n');
final float lineHeight = font.getLineHeight();
- dx += sxy * font.getAdvanceWidth('X') * column;
+ dx += sxy * font.getAdvanceWidth( font.getGlyphID( 'X' ) ) * column;
dy -= sxy * lineHeight * ( row + 1 );
final PMVMatrix4f pmvMatrix = getMatrix();
@@ -294,7 +294,7 @@ public abstract class TextRendererGLELBase implements GLEventListener {
}
final float sxy = pixelScale * pixelSize;
final float lineHeight = font.getLineHeight();
- dx += sxy * font.getAdvanceWidth('X') * column;
+ dx += sxy * font.getAdvanceWidth( font.getGlyphID( 'X' ) ) * column;
dy -= sxy * lineHeight * ( row + 1 );
final PMVMatrix4f pmvMatrix = getMatrix();