summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/graph/font
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp/graph/font')
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java6
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java6
2 files changed, 4 insertions, 8 deletions
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java
index f5358b74b..90cc725e0 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java
@@ -253,11 +253,7 @@ class TypecastFont implements Font {
@Override
public int getLineHeightFU() {
final Metrics metrics = getMetrics();
- final int lineGap = metrics.getLineGapFU() ; // negative value!
- final int descent = metrics.getDescentFU() ; // positive value!
- final int ascent = metrics.getAscentFU() ; // negative value!
- final int advanceY = lineGap - descent + ascent; // negative value!
- return -advanceY;
+ return metrics.getAscentFU() - metrics.getDescentFU() + metrics.getLineGapFU();
}
@Override
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java
index cae8b2755..a9fd32e9d 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java
@@ -65,7 +65,7 @@ final class TypecastHMetrics implements Metrics {
@Override
public int getAscentFU() {
- return -hheaTable.getAscender(); // inverted
+ return hheaTable.getAscender();
}
@Override
@@ -75,7 +75,7 @@ final class TypecastHMetrics implements Metrics {
@Override
public int getDescentFU() {
- return -hheaTable.getDescender(); // inverted
+ return hheaTable.getDescender();
}
@Override
@@ -85,7 +85,7 @@ final class TypecastHMetrics implements Metrics {
@Override
public int getLineGapFU() {
- return -hheaTable.getLineGap(); // inverted
+ return hheaTable.getLineGap();
}
@Override