diff options
author | Sven Gothel <[email protected]> | 2023-09-24 16:51:37 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-09-24 16:51:37 +0200 |
commit | 9db8aeaf345a373029bd497c5125f8471aecbd4e (patch) | |
tree | 81023532414d17b6c7a81cd83636ac17b77b00d2 /src/test/com/jogamp | |
parent | a8de1673ca83475227fcc914fd94a9a0be1cba79 (diff) |
Graph Font Tests: Fix missing codepoint -> GlyphID conversion
Diffstat (limited to 'src/test/com/jogamp')
3 files changed, 3 insertions, 3 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java index bf99aedee..9572b5d6f 100644 --- a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java +++ b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java @@ -249,7 +249,7 @@ public class TestTextRendererNEWT01 extends UITestCase { row = lastRow + 1; } final AABBox textBox = font.getMetricBounds(text); // em-size - dx += fontSize * font.getAdvanceWidth('X') * column; + dx += fontSize * font.getAdvanceWidth( font.getGlyphID( 'X' ) ) * column; dy -= fontSize * textBox.getHeight() * ( row + 1 ); final PMVMatrix4f pmv = renderer.getMatrix(); diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWTBugXXXX.java b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWTBugXXXX.java index ae17e7821..79d50b43e 100644 --- a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWTBugXXXX.java +++ b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWTBugXXXX.java @@ -191,7 +191,7 @@ public class TestTextRendererNEWTBugXXXX extends UITestCase { row = lastRow + 1; } final AABBox textBox = font.getMetricBounds(text); - dx += fontSize * font.getAdvanceWidth('X') * column; + dx += fontSize * font.getAdvanceWidth( font.getGlyphID( 'X' ) ) * column; dy -= fontSize * textBox.getHeight() * ( row + 1 ); final PMVMatrix4f pmv = renderer.getMatrix(); diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TextRendererGLELBase.java b/src/test/com/jogamp/opengl/test/junit/graph/TextRendererGLELBase.java index b09a5c2ab..8b1964388 100644 --- a/src/test/com/jogamp/opengl/test/junit/graph/TextRendererGLELBase.java +++ b/src/test/com/jogamp/opengl/test/junit/graph/TextRendererGLELBase.java @@ -241,7 +241,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 = renderer.getMatrix(); |