Package com.jogamp.graph.font
Interface Font.Glyph
-
- Enclosing interface:
- Font
public static interface Font.Glyph
Glyph for font http://developer.apple.com/textfonts/TTRefMan/RM06/Chap6cmap.html http://developer.apple.com/textfonts/TTRefMan/RM06/Chap6glyf.html http://www.microsoft.com/typography/otspec/glyf.htm
-
-
Field Summary
Fields Modifier and Type Field Description static int
ID_UNKNOWN
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
fullString()
Returns all glyph details as string.float
getAdvanceWidth()
Returns advance in font em-size [0..1], sourced from `hmtx` table.int
getAdvanceWidthFU()
Returns advance in font units, sourced from `hmtx` table.com.jogamp.math.geom.AABBox
getBounds()
Returns the AABBox in font em-size [0..1], creating a new copy.com.jogamp.math.geom.AABBox
getBounds(com.jogamp.math.geom.AABBox dest)
Returns the AABBox in font em-size [0..1], copying into given dest.com.jogamp.math.geom.AABBox
getBoundsFU()
Returns the AABBox in font-units, borrowing internal instance.com.jogamp.math.geom.AABBox
getBoundsFU(com.jogamp.math.geom.AABBox dest)
Returns the AABBox in font-units, copying into given dest.char
getCodepoint()
Returns this glyph's mapped (unicode) `codepoint` symbol.Font
getFont()
Returns theFont
owning thisFont.Glyph
.int
getID()
Returns this glyph's IDfloat
getKerning(int right_glyphid)
Returns the optional kerning inter-glyph distance within words between this glyph and the given right glyph_id in fractional font em-size [0..1].int
getKerningFU(int right_glyphid)
Returns the optional kerning inter-glyph distance within words between this glyph and the given right glyph_id in font-units.int
getKerningPairCount()
Returns the number of kerning values stored for this glyph, associated to a right hand glyph.float
getLeftSideBearings()
Returns leftSideBearings in font em-size [0..1], sourced from `hmtx` table.int
getLeftSideBearingsFU()
Returns leftSideBearings in font units, sourced from `hmtx` table.String
getName()
Returns the glyph's name, source from `post` tableOutlineShape
getShape()
int
hashCode()
boolean
isKerningCrossstream()
True if kerning values are perpendicular to text flow, otherwise along with flowboolean
isKerningHorizontal()
True if kerning values are horizontal, otherwise verticalboolean
isNonContour()
Returns true ifisWhitespace()
orisUndefined()
.boolean
isUndefined()
Returns true if the Glyph denotes an undefinedgetID()
symbol, determined as follows it's glyph index isID_UNKNOWN
, i.e.boolean
isWhitespace()
Returns true if the Glyph denotes a whitespace, determined as follows is notisUndefined()
has no original underlying shape has an underlying shape with a zero sized areaString
toString()
-
-
-
Field Detail
-
ID_UNKNOWN
static final int ID_UNKNOWN
- See Also:
- Constant Field Values
-
-
Method Detail
-
getFont
Font getFont()
Returns theFont
owning thisFont.Glyph
.
-
getCodepoint
char getCodepoint()
Returns this glyph's mapped (unicode) `codepoint` symbol.
-
getID
int getID()
Returns this glyph's ID
-
getName
String getName()
Returns the glyph's name, source from `post` table
-
isUndefined
boolean isUndefined()
Returns true if the Glyph denotes an undefinedgetID()
symbol, determined as follows- it's glyph index is
ID_UNKNOWN
, i.e.0x00
- has the
name
`.notdef`, `NULL`, `null` or `.null`
An undefined glyph has no
getShape()
if glyph index is notID_UNKNOWN
.An undefined glyph has a default
Being an undefined shape excludesgetBounds()
andgetAdvanceWidth()
.isWhitespace()
.- See Also:
isWhitespace()
,isNonContour()
- it's glyph index is
-
isWhitespace
boolean isWhitespace()
Returns true if the Glyph denotes a whitespace, determined as follows- is not
isUndefined()
- has no original underlying shape
- has an underlying shape with a zero sized area
A whitespace glyph has no
Being a whitespace glyph excludesgetShape()
, but a validgetBounds()
andgetAdvanceWidth()
.isUndefined()
.- See Also:
isUndefined()
,isNonContour()
- is not
-
isNonContour
boolean isNonContour()
Returns true ifisWhitespace()
orisUndefined()
.- See Also:
isWhitespace()
,isUndefined()
-
getBoundsFU
com.jogamp.math.geom.AABBox getBoundsFU()
Returns the AABBox in font-units, borrowing internal instance.
-
getBoundsFU
com.jogamp.math.geom.AABBox getBoundsFU(com.jogamp.math.geom.AABBox dest)
Returns the AABBox in font-units, copying into given 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)
Returns the AABBox in font em-size [0..1], copying into given 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 em-size [0..1]
-
getBounds
com.jogamp.math.geom.AABBox getBounds()
Returns the AABBox in font em-size [0..1], creating a new copy.
-
getAdvanceWidthFU
int getAdvanceWidthFU()
Returns advance in font units, sourced from `hmtx` table.
-
getAdvanceWidth
float getAdvanceWidth()
Returns advance in font em-size [0..1], sourced from `hmtx` table.
-
getLeftSideBearingsFU
int getLeftSideBearingsFU()
Returns leftSideBearings in font units, sourced from `hmtx` table.
-
getLeftSideBearings
float getLeftSideBearings()
Returns leftSideBearings in font em-size [0..1], sourced from `hmtx` table.
-
isKerningHorizontal
boolean isKerningHorizontal()
True if kerning values are horizontal, otherwise vertical
-
isKerningCrossstream
boolean isKerningCrossstream()
True if kerning values are perpendicular to text flow, otherwise along with flow
-
getKerningPairCount
int getKerningPairCount()
Returns the number of kerning values stored for this glyph, associated to a right hand glyph.
-
getKerningFU
int getKerningFU(int right_glyphid)
Returns the optional kerning inter-glyph distance within words between this glyph and the given right glyph_id in font-units.- Parameters:
right_glyphid
- right glyph code id- Returns:
- font-units
-
getKerning
float getKerning(int right_glyphid)
Returns the optional kerning inter-glyph distance within words between this glyph and the given right glyph_id in fractional font em-size [0..1].- Parameters:
right_glyphid
- right glyph code id- Returns:
- fractional font em-size distance [0..1]
-
getShape
OutlineShape getShape()
-
fullString
String fullString()
Returns all glyph details as string.
-
-