Package com.jogamp.graph.font
Interface Font.Metrics
-
- Enclosing interface:
- Font
public static interface Font.Metrics
Metrics 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 float
getAscent()
Distance from baseline of highest ascender, a positive value.int
getAscentFU()
Distance from baseline of highest ascender, a positive value.AABBox
getBounds(AABBox dest)
AABBox
getBoundsFU(AABBox dest)
float
getDescent()
Distance from baseline of lowest descender, a negative value.int
getDescentFU()
Distance from baseline of lowest descender, a negative value.float
getLineGap()
Typographic line gap, a positive value.int
getLineGapFU()
Typographic line gap, a positive value.float
getMaxExtend()
max(lsb + (xMax-xMin)), a positive value.int
getMaxExtendFU()
max(lsb + (xMax-xMin)), a positive value.float
getScale(int funits)
Return fractional font em-size [0..1], i.e.int
getUnitsPerEM()
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)
Return 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
AABBox getBoundsFU(AABBox dest)
- Parameters:
dest
- AABBox instance set to this metrics boundary in font-units- Returns:
- the given and set AABBox 'dest' in font units
-
-