diff options
author | Sven Gothel <[email protected]> | 2023-02-19 17:34:47 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-02-19 17:34:47 +0100 |
commit | 60827d6df7c99f77ab95e25a6e94da74ccb1e2b6 (patch) | |
tree | 988ad1939533a7de2892236d1c55445c93b70beb /src/jogl/classes/com | |
parent | c30471f8bf51d403ab9cd1a253742f757407cee6 (diff) |
Graph Font.Glyph: Cleanup: Remove Font and getScale() from interface (redundant), add getLeftSideBearings*() from htmx table; Flatten TypecastGlyph impl by merging its Metrics, add equal() complementing hashCode()
Diffstat (limited to 'src/jogl/classes/com')
-rw-r--r-- | src/jogl/classes/com/jogamp/graph/font/Font.java | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/font/Font.java b/src/jogl/classes/com/jogamp/graph/font/Font.java index 541cec8dc..a2fcfb23a 100644 --- a/src/jogl/classes/com/jogamp/graph/font/Font.java +++ b/src/jogl/classes/com/jogamp/graph/font/Font.java @@ -166,8 +166,6 @@ public interface Font { // http://scripts.sil.org/cms/scripts/page.php?item_id=IWS-Chapter08#ba57949e public static final int ID_UNKNOWN = 0; - Font getFont(); - /** Return this glyph's ID */ int getID(); @@ -175,16 +173,6 @@ public interface Font { String getName(); /** - * Return fractional font em-size [0..1], i.e. funits divided by {@link #getUnitsPerEM()}, i.e. - * <pre> - * return funits / head.unitsPerEM; - * </pre> - * @param funits smallest font unit, where {@link #getUnitsPerEM()} square covers whole glyph - * @return fractional font em-size [0..1] - */ - float getScale(final int funits); - - /** * Return the AABBox in font-units, borrowing internal instance. */ AABBox getBBoxFU(); @@ -215,8 +203,15 @@ public interface Font { /** Return advance in font em-size [0..1], sourced from `hmtx` table. */ float getAdvance(); + /** Return leftSideBearings in font units, sourced from `hmtx` table. */ + int getLeftSideBearingsFU(); + + /** Return leftSideBearings in font em-size [0..1], sourced from `hmtx` table. */ + float getLeftSideBearings(); + /** True if kerning values are horizontal, otherwise vertical */ boolean isKerningHorizontal(); + /** True if kerning values are perpendicular to text flow, otherwise along with flow */ boolean isKerningCrossstream(); |