diff options
author | Sven Gothel <[email protected]> | 2023-04-14 17:43:55 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-04-14 17:43:55 +0200 |
commit | 3d0f8a7cd720801c6f247c38c95df556a10fff27 (patch) | |
tree | 94b666d77fb94b9e1f41a496586e776796780a3a /src/jogl/classes | |
parent | e4bddd1682233257a20eb73e22b068d5d4694860 (diff) |
Typecast Font.Glyph: Expose isUndefined(), i.e. name == ".notdef"
Diffstat (limited to 'src/jogl/classes')
-rw-r--r-- | src/jogl/classes/com/jogamp/graph/font/Font.java | 3 | ||||
-rw-r--r-- | src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/font/Font.java b/src/jogl/classes/com/jogamp/graph/font/Font.java index 4829cb0fd..7299d6128 100644 --- a/src/jogl/classes/com/jogamp/graph/font/Font.java +++ b/src/jogl/classes/com/jogamp/graph/font/Font.java @@ -179,6 +179,9 @@ public interface Font { /** Return true if the underlying {@link #getShape()} is a whitespace, otherwise false. */ boolean isWhiteSpace(); + /** Return true if the Glyph denotes an undefined {@link #getID()} symbol, i.e. {@link #getName()} == `.notdef`. */ + boolean isUndefined(); + /** * Return the AABBox in font-units, borrowing internal instance. */ diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java index 560d0902b..d851efc3e 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java @@ -142,6 +142,9 @@ public final class TypecastGlyph implements Font.Glyph { public final boolean isWhiteSpace() { return this.isWhiteSpace; } @Override + public final boolean isUndefined() { return name == ".notdef"; } + + @Override public final AABBox getBoundsFU() { return bbox; } @Override |