JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.graph.font.Font.Metrics Interface Reference

Metrics for font. More...

Collaboration diagram for com.jogamp.graph.font.Font.Metrics:

Public Member Functions

int getAscentFU ()
 Distance from baseline of highest ascender, a positive value. More...
 
float getAscent ()
 Distance from baseline of highest ascender, a positive value. More...
 
int getDescentFU ()
 Distance from baseline of lowest descender, a negative value. More...
 
float getDescent ()
 Distance from baseline of lowest descender, a negative value. More...
 
int getLineGapFU ()
 Typographic line gap, a positive value. More...
 
float getLineGap ()
 Typographic line gap, a positive value. More...
 
int getMaxExtendFU ()
 max(lsb + (xMax-xMin)), a positive value. More...
 
float getMaxExtend ()
 max(lsb + (xMax-xMin)), a positive value. More...
 
int getUnitsPerEM ()
 Returns the font's units per EM from the 'head' table. More...
 
float getScale (final int funits)
 Returns fractional font em-size [0..1], i.e. More...
 
AABBox getBoundsFU (final AABBox dest)
 
AABBox getBounds (final AABBox dest)
 

Detailed Description

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

Definition at line 82 of file Font.java.

Member Function Documentation

◆ getAscent()

float com.jogamp.graph.font.Font.Metrics.getAscent ( )

Distance from baseline of highest ascender, a positive value.

Returns
ascent in font em-size [0..1], sourced from ‘hhea’ table.

◆ getAscentFU()

int com.jogamp.graph.font.Font.Metrics.getAscentFU ( )

Distance from baseline of highest ascender, a positive value.

Returns
ascent in font-units, sourced from ‘hhea’ table.

◆ getBounds()

AABBox com.jogamp.graph.font.Font.Metrics.getBounds ( final AABBox  dest)
Parameters
destAABBox instance set to this metrics boundary in font em-size [0..1]
Returns
the given and set AABBox 'dest' in font units

◆ getBoundsFU()

AABBox com.jogamp.graph.font.Font.Metrics.getBoundsFU ( final AABBox  dest)
Parameters
destAABBox instance set to this metrics boundary in font-units
Returns
the given and set AABBox 'dest' in font units

◆ getDescent()

float com.jogamp.graph.font.Font.Metrics.getDescent ( )

Distance from baseline of lowest descender, a negative value.

Returns
descend in font em-size [0..1], sourced from ‘hhea’ table.
Here is the caller graph for this function:

◆ getDescentFU()

int com.jogamp.graph.font.Font.Metrics.getDescentFU ( )

Distance from baseline of lowest descender, a negative value.

Returns
descent in font-units, sourced from ‘hhea’ table.

◆ getLineGap()

float com.jogamp.graph.font.Font.Metrics.getLineGap ( )

Typographic line gap, a positive value.

Returns
line-gap in font em-size [0..1], sourced from ‘hhea’ table.
Here is the caller graph for this function:

◆ getLineGapFU()

int com.jogamp.graph.font.Font.Metrics.getLineGapFU ( )

Typographic line gap, a positive value.

Returns
line-gap in font-units, sourced from ‘hhea’ table.

◆ getMaxExtend()

float com.jogamp.graph.font.Font.Metrics.getMaxExtend ( )

max(lsb + (xMax-xMin)), a positive value.

Returns
max-extend in font em-size [0..1], sourced from ‘hhea’ table.

◆ getMaxExtendFU()

int com.jogamp.graph.font.Font.Metrics.getMaxExtendFU ( )

max(lsb + (xMax-xMin)), a positive value.

Returns
max-extend in font-units, sourced from ‘hhea’ table.

◆ getScale()

float com.jogamp.graph.font.Font.Metrics.getScale ( final int  funits)

Returns fractional font em-size [0..1], i.e.

funits divided by getUnitsPerEM(), i.e.

   return funits / head.unitsPerEM;
Parameters
funitssmallest font unit, where getUnitsPerEM() square covers whole glyph
Returns
fractional font em-size [0..1]

◆ getUnitsPerEM()

int com.jogamp.graph.font.Font.Metrics.getUnitsPerEM ( )

Returns the font's units per EM from the 'head' table.

One em square covers one glyph.


The documentation for this interface was generated from the following file: