summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-02-19 05:21:11 +0100
committerSven Gothel <[email protected]>2023-02-19 05:21:11 +0100
commitdd98cf0ae983429187256ab3236fa7dad1cd13d0 (patch)
tree6d5bf08f80b3280f143ed2e73e78894c0c0a4cc7 /src/jogl/classes/com/jogamp
parentda88b0f2ac0b09082222ce1a387987e8cdd5f21d (diff)
Graph Font: Add 'name' to Glyph; Drop erroneous Glyph ID_SPACE, ID_CR manual mapping, rely on no-shape for 'space' non-contour.
Drop erroneous Glyph ID_SPACE, ID_CR to rely on no-shape for 'space' non-contour resolves different cmap-mappings of fonts, not following 'some std'. Hence getGlyph(glyph_id) no more uses the `font.getGlyph(Glyph.ID_UNKNOWN)` shape, but a null-shape as intended and using the hmtx and hhea table values for asvance and bounds. This fixes 'space' spacing in general and specifically FreeSerif-Regular and the like. This path also simplifies processing/layout of glyphs in process(..) and get*BoundsFU(..).
Diffstat (limited to 'src/jogl/classes/com/jogamp')
-rw-r--r--src/jogl/classes/com/jogamp/graph/font/Font.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/font/Font.java b/src/jogl/classes/com/jogamp/graph/font/Font.java
index 20986795b..541cec8dc 100644
--- a/src/jogl/classes/com/jogamp/graph/font/Font.java
+++ b/src/jogl/classes/com/jogamp/graph/font/Font.java
@@ -165,14 +165,15 @@ public interface Font {
// reserved special glyph IDs
// http://scripts.sil.org/cms/scripts/page.php?item_id=IWS-Chapter08#ba57949e
public static final int ID_UNKNOWN = 0;
- public static final int ID_CR = 2;
- public static final int ID_SPACE = 3;
Font getFont();
/** Return this glyph's ID */
int getID();
+ /** Return the glyph's name, source from `post` table */
+ String getName();
+
/**
* Return fractional font em-size [0..1], i.e. funits divided by {@link #getUnitsPerEM()}, i.e.
* <pre>