summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/graph/font
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-03-01 16:47:30 +0100
committerSven Gothel <[email protected]>2014-03-01 16:47:30 +0100
commit183e1bc1868699b99eb9f9c8bf18d646d1120a48 (patch)
treee1ea001486615e7cc41e467a48f8fb3681444ac1 /src/jogl/classes/jogamp/graph/font
parent7a1dbd0d87a15f582f568a20adbbe42505bdca33 (diff)
Bug 801: VBAA Render-Mode Based on SampleCount (not a user-based texWidth) ; Proper FontSize -> PixelSize
VBAA Render-Mode Based on SampleCount (not a user-based texWidth) - All Region based APIs now use 'sampleCount' instead of 'texWidth' - VBORegion2PES2 calculates perspective FBO width/height considering the sampleCount Proper FontSize -> PixelSize - Font: Add getPixelSize(fontSize, dpi) - Text* Demos/Classes: Use proper fontSize -> PixelSize
Diffstat (limited to 'src/jogl/classes/jogamp/graph/font')
-rw-r--r--src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java2
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java b/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java
index e1e44c92c..c7efe143b 100644
--- a/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java
+++ b/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java
@@ -38,9 +38,7 @@ import com.jogamp.graph.font.Font;
import com.jogamp.graph.font.FontSet;
import com.jogamp.graph.font.FontFactory;
-import java.net.MalformedURLException;
import java.net.URI;
-import java.net.URISyntaxException;
import java.net.URLConnection;
import java.security.AccessController;
import java.security.PrivilegedAction;
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java
index 8dd9ce4d7..ae9c43ec5 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java
@@ -222,6 +222,11 @@ class TypecastFont implements Font {
}
@Override
+ public final float getPixelSize(float fontSize /* points per inch */, float resolution) {
+ return fontSize * resolution / ( 72 /* points per inch */ );
+ }
+
+ @Override
public float getLineHeight(float pixelSize) {
final Metrics metrics = getMetrics();
final float lineGap = metrics.getLineGap(pixelSize) ; // negative value!