public interface Font
TrueType Font Specification:
TrueType Font Table Introduction:
Misc.:
Rasterization https://freddie.witherden.org/pages/font-rasterisation/http://walon.org/pub/ttf/ttf_glyphs.htm| Modifier and Type | Interface and Description |
|---|---|
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
|
static interface |
Font.Metrics
Metrics for font
Depending on the font's direction, horizontal or vertical,
the following tables shall be used:
Vertical http://developer.apple.com/fonts/TTRefMan/RM06/Chap6vhea.html
Horizontal http://developer.apple.com/fonts/TTRefMan/RM06/Chap6hhea.html
|
| Modifier and Type | Field and Description |
|---|---|
static int |
NAME_COPYRIGHT
font name indices for name table
|
static int |
NAME_DESIGNER |
static int |
NAME_FAMILY |
static int |
NAME_FULLNAME |
static int |
NAME_MANUFACTURER |
static int |
NAME_SUBFAMILY |
static int |
NAME_UNIQUNAME |
static int |
NAME_VERSION |
| Modifier and Type | Method and Description |
|---|---|
float |
getAdvanceWidth(int glyphID,
float pixelSize) |
StringBuilder |
getAllNames(StringBuilder string,
String separator) |
StringBuilder |
getFullFamilyName(StringBuilder buffer)
Shall return the family and subfamily name, separated a dash.
|
Font.Glyph |
getGlyph(char symbol) |
float |
getLineHeight(float pixelSize) |
AABBox |
getMetricBounds(CharSequence string,
float pixelSize)
Return the layout bounding box as computed by each glyph's metrics.
|
float |
getMetricHeight(CharSequence string,
float pixelSize,
AABBox tmp) |
Font.Metrics |
getMetrics() |
float |
getMetricWidth(CharSequence string,
float pixelSize) |
String |
getName(int nameIndex) |
StringBuilder |
getName(StringBuilder string,
int nameIndex) |
int |
getNumGlyphs() |
float |
getPixelSize(float fontSize,
float resolution)
Font Scale Formula:
inch: 25.4 mm
pointSize: [point] = [1/72 inch]
[1] Scale := pointSize * resolution / ( 72 points per inch * units_per_em )
[2] PixelSize := pointSize * resolution / ( 72 points per inch )
[3] Scale := PixelSize / units_per_em
|
AABBox |
getPointsBounds(jogamp.graph.geom.plane.AffineTransform transform,
CharSequence string,
float pixelSize,
jogamp.graph.geom.plane.AffineTransform temp1,
jogamp.graph.geom.plane.AffineTransform temp2)
Return the bounding box by taking each glyph's point-based bounding box into account.
|
boolean |
isPrintableChar(char c) |
String |
toString()
Shall return
#getFullFamilyName() |
static final int NAME_COPYRIGHT
static final int NAME_FAMILY
static final int NAME_SUBFAMILY
static final int NAME_UNIQUNAME
static final int NAME_FULLNAME
static final int NAME_VERSION
static final int NAME_MANUFACTURER
static final int NAME_DESIGNER
String getName(int nameIndex)
StringBuilder getName(StringBuilder string, int nameIndex)
StringBuilder getFullFamilyName(StringBuilder buffer)
getName(StringBuilder, int) w/ NAME_FAMILY and NAME_SUBFAMILY
Example: "Ubuntu-Regular"
StringBuilder getAllNames(StringBuilder string, String separator)
float getPixelSize(float fontSize,
float resolution)
Font Scale Formula:
inch: 25.4 mm
pointSize: [point] = [1/72 inch]
[1] Scale := pointSize * resolution / ( 72 points per inch * units_per_em )
[2] PixelSize := pointSize * resolution / ( 72 points per inch )
[3] Scale := PixelSize / units_per_em
fontSize - in point-per-inchresolution - display resolution in dots-per-inchfloat getAdvanceWidth(int glyphID,
float pixelSize)
glyphID - pixelSize - Use pointSize * resolution for resolution correct pixel-size, see getPixelSize(float, float)Font.Metrics getMetrics()
Font.Glyph getGlyph(char symbol)
int getNumGlyphs()
float getLineHeight(float pixelSize)
pixelSize - Use pointSize * resolution for resolution correct pixel-size, see getPixelSize(float, float)float getMetricWidth(CharSequence string, float pixelSize)
string - pixelSize - Use pointSize * resolution for resolution correct pixel-size, see getPixelSize(float, float)float getMetricHeight(CharSequence string, float pixelSize, AABBox tmp)
string - pixelSize - Use pointSize * resolution for resolution correct pixel-size, see getPixelSize(float, float)tmp - AABBox getMetricBounds(CharSequence string, float pixelSize)
See getPointsBounds(AffineTransform, CharSequence, float, AffineTransform, AffineTransform) for pixel correct results.
string - string textpixelSize - Use pointSize * resolution for resolution correct pixel-size, see getPixelSize(float, float)AABBox getPointsBounds(jogamp.graph.geom.plane.AffineTransform transform, CharSequence string, float pixelSize, jogamp.graph.geom.plane.AffineTransform temp1, jogamp.graph.geom.plane.AffineTransform temp2)
transform - optional given transformstring - string textpixelSize - Use pointSize * resolution for resolution correct pixel-size, see getPixelSize(float, float)temp1 - temporary AffineTransform storage, mandatorytemp2 - temporary AffineTransform storage, mandatoryboolean isPrintableChar(char c)
Copyright 2010 JogAmp Community.