28package com.jogamp.graph.font;
30import com.jogamp.graph.curve.OutlineShape;
31import com.jogamp.math.geom.AABBox;
32import com.jogamp.math.geom.plane.AffineTransform;
327 public void visit(
final char codepoint,
final int glyph_id);
339 return Character.toString(codepoint);
350 if(
null != a &&
null != b ) {
352 }
else if(
null != a ) {
366 StringBuilder
getAllNames(
final StringBuilder
string,
final String separator);
591 final CharSequence
string);
609 final CharSequence
string,
A Generic shape objects which is defined by a list of Outlines.
Axis Aligned Bounding Box.
General purpose (unicode) codepoint symbol and Font.Glyph ID visitor without enforcing Glyph caching.
void visit(final char codepoint, final int glyph_id)
Visiting the given (unicode) codepoint symbol and Font.Glyph ID.
General purpose Font.Glyph visitor w/o AffineTransform.
void visit(final Glyph glyph)
Visiting the given Font.Glyph.
General purpose Font.Glyph visitor.
void visit(final Glyph glyph, final AffineTransform t)
Visiting the given Font.Glyph having an OutlineShape with it's corresponding AffineTransform.
int getLeftSideBearingsFU()
Returns leftSideBearings in font units, sourced from hmtx table.
boolean isNonContour()
Returns true if isWhitespace() or isUndefined().
int getKerningPairCount()
Returns the number of kerning values stored for this glyph, associated to a right hand glyph.
boolean isUndefined()
Returns true if the Glyph denotes an undefined getID() symbol, determined as follows.
AABBox getBoundsFU()
Returns the AABBox in font-units, borrowing internal instance.
Font getFont()
Returns the Font owning this Glyph.
String fullString()
Returns all glyph details as string.
float getKerning(final int right_glyphid)
Returns the optional kerning inter-glyph distance within words between this glyph and the given right...
float getLeftSideBearings()
Returns leftSideBearings in font em-size [0..1], sourced from hmtx table.
float getAdvanceWidth()
Returns advance in font em-size [0..1], sourced from hmtx table.
AABBox getBounds()
Returns the AABBox in font em-size [0..1], creating a new copy.
char getCodepoint()
Returns this glyph's mapped (unicode) codepoint symbol.
static final int ID_UNKNOWN
int getKerningFU(final int right_glyphid)
Returns the optional kerning inter-glyph distance within words between this glyph and the given right...
String getName()
Returns the glyph's name, source from post table.
boolean isKerningHorizontal()
True if kerning values are horizontal, otherwise vertical.
boolean isKerningCrossstream()
True if kerning values are perpendicular to text flow, otherwise along with flow.
boolean isWhitespace()
Returns true if the Glyph denotes a whitespace, determined as follows.
AABBox getBoundsFU(final AABBox dest)
Returns the AABBox in font-units, copying into given dest.
int getID()
Returns this glyph's ID.
int getAdvanceWidthFU()
Returns advance in font units, sourced from hmtx table.
AABBox getBounds(final AABBox dest)
Returns the AABBox in font em-size [0..1], copying into given dest.
float getMaxExtend()
max(lsb + (xMax-xMin)), a positive value.
int getLineGapFU()
Typographic line gap, a positive value.
int getUnitsPerEM()
Returns the font's units per EM from the 'head' table.
float getScale(final int funits)
Returns fractional font em-size [0..1], i.e.
int getMaxExtendFU()
max(lsb + (xMax-xMin)), a positive value.
float getAscent()
Distance from baseline of highest ascender, a positive value.
float getDescent()
Distance from baseline of lowest descender, a negative value.
AABBox getBoundsFU(final AABBox dest)
AABBox getBounds(final AABBox dest)
float getLineGap()
Typographic line gap, a positive value.
int getDescentFU()
Distance from baseline of lowest descender, a negative value.
int getAscentFU()
Distance from baseline of highest ascender, a positive value.
Interface wrapper for font implementation.
AABBox getGlyphBounds(final CharSequence string, final AffineTransform tmp1, final AffineTransform tmp2)
Returns accurate bounding box by taking each glyph's font em-sized bounding box into account.
int getLineHeightFU()
Returns line height, baseline-to-baseline in font-units, composed from ‘hhea’ table entries.
Glyph getGlyph(final String name)
Returns the Glyph mapped to given name.
AABBox getMetricBounds(final CharSequence string)
Returns metric-bounds in font em-size.
AABBox processString(final Font.GlyphVisitor visitor, final AffineTransform transform, final CharSequence string, final AffineTransform temp1, final AffineTransform temp2)
Visit each Glyph and perhaps its OutlineShape of the string with the Font.GlyphVisitor while passing ...
void processString(final Font.GlyphVisitor2 visitor, final CharSequence string)
Visit each Glyph and perhaps its OutlineShape of the string with the constrained Font....
AABBox getGlyphBoundsFU(final CharSequence string, final AffineTransform tmp1, final AffineTransform tmp2)
Returns accurate bounding box by taking each glyph's font-units sized bounding box into account.
float getLineHeight()
Returns line height, baseline-to-baseline in em-size [0..1], composed from ‘hhea’ table entries.
AABBox getMetricBoundsFU(final CharSequence string)
Returns metric-bounds in font-units.
String getName(final int nameIndex)
static final int NAME_COPYRIGHT
font name indices for name table
static final int NAME_FULLNAME
static final int NAME_FAMILY
void forAllCodepoints(final Font.CodepointIDVisitor visitor)
Visit all (unicode) codepoint symbol and Glyph ID tuple of this font.
AABBox getGlyphShapeBounds(final AffineTransform transform, final CharSequence string)
Returns accurate bounding box by taking each glyph's font em-sized OutlineShape into account.
String fullString()
Returns all font details as string.
String getFullFamilyName()
Shall return the family and subfamily name, separated a dash.
AABBox getGlyphShapeBounds(final AffineTransform transform, final CharSequence string, final AffineTransform tmp1, final AffineTransform tmp2)
Returns accurate bounding box by taking each glyph's font em-sized OutlineShape into account.
int getDefinedCount(final CharSequence text)
Returns the number of defined Glyphs (coverage), i.e.
AABBox getGlyphBounds(final CharSequence string)
Try using getGlyphBounds(CharSequence, AffineTransform, AffineTransform) to reuse AffineTransform ins...
static final int NAME_UNIQUNAME
AABBox processString(final Font.GlyphVisitor visitor, final AffineTransform transform, final CharSequence string)
Try using processString(GlyphVisitor, AffineTransform, CharSequence, AffineTransform,...
int getGlyphID(final char codepoint)
Returns the Glyph ID mapped to given UTF16 (unicode) codepoint symbol.
static final int NAME_SUBFAMILY
String toString()
Returns getFullFamilyName().
int getAdvanceWidthFU(final int glyphID)
Returns advance-width of given glyphID in font-units, sourced from hmtx table - same as Glyph#getAdva...
int getGlyphCount()
Returns number of Glyph IDs available, i.e.
boolean equals(final Object o)
Returns true if other instance is of same type and NAME_UNIQUNAME is equal.
char getGlyphCodepoint(final String name)
Returns the Glyph (unicode) codepoint symbol mapped to given Glyph name.
void forAllGlyphs(final Font.GlyphVisitor2 visitor)
Visit all Glyphs of this font.
AABBox getGlyphBoundsFU(final CharSequence string)
Try using getGlyphBoundsFU(CharSequence, AffineTransform, AffineTransform) to reuse AffineTransform i...
Glyph getGlyph(final int glyph_id)
Returns the Glyph using given ID.
static Font getBestCoverage(final Font a, final Font b, final CharSequence s)
Returns Font with best coverage for given text while favoring a.
static final int NAME_VERSION
static final int NAME_MANUFACTURER
static final int NAME_DESIGNER
StringBuilder getAllNames(final StringBuilder string, final String separator)
boolean isPrintableChar(final char c)
String getUTF16String(final String name)
Returns UTF-16 representation of the specified Glyph name using getGlyphCodepoint(String) and getUTF1...
int hashCode()
Returns the hash code based on NAME_UNIQUNAME.
static String getUTF16String(final char codepoint)
Returns UTF-16 representation of the specified (unicode) codepoint symbol like Character#toChars(int)...
float getAdvanceWidth(final int glyphID)
Returns advance-width of given glyphID in font em-size [0..1], sourced from hmtx table - same as Glyp...
Glyph getGlyph(final char codepoint)
Returns the Glyph mapped to given (unicode) codepoint symbol.