aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/graph
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp/graph')
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java
index c60629582..0a251a378 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java
@@ -224,6 +224,17 @@ class TypecastFont implements Font {
public int getGlyphCount() { return font.getGlyphCount(); }
@Override
+ public int getDefinedCount(final CharSequence text) {
+ int res = 0;
+ for(int i=text.length()-1; i>=0; --i) {
+ if( !getGlyph(text.charAt(i)).isUndefined() ) {
+ ++res;
+ }
+ }
+ return res;
+ }
+
+ @Override
public char getGlyphCodepoint(final String name) {
final SymAndID value = nameToGlyph.get(name);
if( null != value ) {