Package com.jogamp.graph.font
Interface Font.Metrics
-
- Enclosing interface:
- Font
public static interface Font.MetricsMetrics for font Depending on the font's direction, horizontal or vertical, the following tables shall be used: Vertical https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6vhea.html Horizontal https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6hhea.html
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description floatgetAscent()Distance from baseline of highest ascender, a positive value.intgetAscentFU()Distance from baseline of highest ascender, a positive value.com.jogamp.math.geom.AABBoxgetBounds(com.jogamp.math.geom.AABBox dest)com.jogamp.math.geom.AABBoxgetBoundsFU(com.jogamp.math.geom.AABBox dest)floatgetDescent()Distance from baseline of lowest descender, a negative value.intgetDescentFU()Distance from baseline of lowest descender, a negative value.floatgetLineGap()Typographic line gap, a positive value.intgetLineGapFU()Typographic line gap, a positive value.floatgetMaxExtend()max(lsb + (xMax-xMin)), a positive value.intgetMaxExtendFU()max(lsb + (xMax-xMin)), a positive value.floatgetScale(int funits)Returns fractional font em-size [0..1], i.e.intgetUnitsPerEM()Returns the font's units per EM from the 'head' table.
-
-
-
Method Detail
-
getAscentFU
int getAscentFU()
Distance from baseline of highest ascender, a positive value.- Returns:
- ascent in font-units, sourced from `hhea' table.
-
getAscent
float getAscent()
Distance from baseline of highest ascender, a positive value.- Returns:
- ascent in font em-size [0..1], sourced from `hhea' table.
-
getDescentFU
int getDescentFU()
Distance from baseline of lowest descender, a negative value.- Returns:
- descent in font-units, sourced from `hhea' table.
-
getDescent
float getDescent()
Distance from baseline of lowest descender, a negative value.- Returns:
- descend in font em-size [0..1], sourced from `hhea' table.
-
getLineGapFU
int getLineGapFU()
Typographic line gap, a positive value.- Returns:
- line-gap in font-units, sourced from `hhea' table.
-
getLineGap
float getLineGap()
Typographic line gap, a positive value.- Returns:
- line-gap in font em-size [0..1], sourced from `hhea' table.
-
getMaxExtendFU
int getMaxExtendFU()
max(lsb + (xMax-xMin)), a positive value.- Returns:
- max-extend in font-units, sourced from `hhea' table.
-
getMaxExtend
float getMaxExtend()
max(lsb + (xMax-xMin)), a positive value.- Returns:
- max-extend in font em-size [0..1], sourced from `hhea' table.
-
getUnitsPerEM
int getUnitsPerEM()
Returns the font's units per EM from the 'head' table. One em square covers one glyph.
-
getScale
float getScale(int funits)
Returns fractional font em-size [0..1], i.e. funits divided bygetUnitsPerEM(), i.e.return funits / head.unitsPerEM;- Parameters:
funits- smallest font unit, wheregetUnitsPerEM()square covers whole glyph- Returns:
- fractional font em-size [0..1]
-
getBoundsFU
com.jogamp.math.geom.AABBox getBoundsFU(com.jogamp.math.geom.AABBox dest)
- Parameters:
dest- AABBox instance set to this metrics boundary in font-units- Returns:
- the given and set AABBox 'dest' in font units
-
getBounds
com.jogamp.math.geom.AABBox getBounds(com.jogamp.math.geom.AABBox dest)
- Parameters:
dest- AABBox instance set to this metrics boundary in font em-size [0..1]- Returns:
- the given and set AABBox 'dest' in font units
-
-