| Modifier and Type | Field and Description |
|---|---|
| private float | ascent
The distance from the baseline to the avg max character height. |
| private int | baseline
The baseline is the imaginary line upon which letters without descenders (for example, the lowercase letter "a") sits. |
| private float | descent
The distance from the baseline down to the lowest avg. |
| private Font | font
The font that was used to construct these metrics. |
| private float | leading
The amount of space between lines of text in this font. |
| private float | lineHeight
The maximum line height for a line of text in this font |
| private float | maxAscent
The distance from the baseline to the max character height. |
| private float | maxDescent
The distance from the baseline down to the absolute lowest descender. |
| private float | xheight
The distance from the baseline to the top of the avg. |
| Access | Constructor and Description |
|---|---|
| public | FontMetrics(float maxAscent, float ascent, float xheight, float descent, float maxDescent, float leading, Font font)
|
| Modifier and Type | Method and Description |
|---|---|
| public static FontMetrics | createFontMetrics(float maxAscent, float ascent, float xheight, float descent, float maxDescent, float leading, Font font)
|
| public final float | |
| public final int | |
| public float | getCharWidth(char ch)
Computes the width of the char when rendered with the font represented by this FontMetrics instance. |
| public final float | |
| public final Font | |
| public final float | |
| public final float | |
| public final float | |
| public final float | |
| public final float | |
| public String |
| ascent | back to summary |
|---|---|
| private float ascent The distance from the baseline to the avg max character height. this value is always positive | |
| baseline | back to summary |
|---|---|
| private int baseline The baseline is the imaginary line upon which letters without descenders (for example, the lowercase letter "a") sits. In terms of the font metrics, all other metrics are derived from this point. This point is implicitly defined as zero. | |
| descent | back to summary |
|---|---|
| private float descent The distance from the baseline down to the lowest avg. descender. This value is always positive | |
| font | back to summary |
|---|---|
| private Font font The font that was used to construct these metrics. | |
| leading | back to summary |
|---|---|
| private float leading The amount of space between lines of text in this font. This is the amount of space between he maxDecent of one line and the maxAscent of the next. This number is included in the lineHeight. | |
| lineHeight | back to summary |
|---|---|
| private float lineHeight The maximum line height for a line of text in this font | |
| maxAscent | back to summary |
|---|---|
| private float maxAscent The distance from the baseline to the max character height. This value is always positive | |
| maxDescent | back to summary |
|---|---|
| private float maxDescent The distance from the baseline down to the absolute lowest descender. this value is always positive | |
| xheight | back to summary |
|---|---|
| private float xheight The distance from the baseline to the top of the avg. lowercase letter. | |
| FontMetrics | back to summary |
|---|---|
| public FontMetrics(float maxAscent, float ascent, float xheight, float descent, float maxDescent, float leading, Font font) | |
| createFontMetrics | back to summary |
|---|---|
| public static FontMetrics createFontMetrics(float maxAscent, float ascent, float xheight, float descent, float maxDescent, float leading, Font font) | |
| getAscent | back to summary |
|---|---|
| public final float getAscent() | |
| getBaseline | back to summary |
|---|---|
| public final int getBaseline() | |
| getCharWidth | back to summary |
|---|---|
| public float getCharWidth(char ch) Computes the width of the char when rendered with the font represented by this FontMetrics instance. | |
| getDescent | back to summary |
|---|---|
| public final float getDescent() | |
| getFont | back to summary |
|---|---|
| public final Font getFont() | |
| getLeading | back to summary |
|---|---|
| public final float getLeading() | |
| getLineHeight | back to summary |
|---|---|
| public final float getLineHeight() | |
| getMaxAscent | back to summary |
|---|---|
| public final float getMaxAscent() | |
| getMaxDescent | back to summary |
|---|---|
| public final float getMaxDescent() | |
| getXheight | back to summary |
|---|---|
| public final float getXheight() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |