The baselineis the hypothetical line upon which characters rest. Some characters such as y and g have descenders that drop below the baseline.
The ascentof a font is the distance from the tops of the tallest glyphs to the baseline.
The descentof a font is the distance from the baseline to the bottom of the lowest descenders on the glyphs.
The ascentof a character cell defines the position of the baseline within every character cell of a font. It is the number of pixels from the top of the cell to the baseline. The baseline is not a pixel row itself, but occurs between two pixel rows.
The heightof a character, the ascent and the descent are related by the following formula: height = ascent + descent
In the example below, the character cell height is 12 pixels, the cell ascent is 10 pixels
Most scripts share the notion of a baseline: an imaginary horizontal line on which characters rest. In some scripts, parts of glyphs lie below the baseline. The descentspans the distance between the baseline and the lowest descending glyph in a typeface, and the part of a glyph that descends below the baseline has the name descender. Conversely, the ascentspans the distance between the baseline and the top of the glyph that reaches farthest from the baseline. The ascent and descent may or may not include distance added by accents or diacritical marks.
In the Latin, Greek and Cyrillic (sometimes collectively referred to as LGC) scripts, one can refer to the distance from the baseline to the top of regular lowercase glyphs (mean line) as the x-height, and the part of a glyph rising above the x-height as the ascender. The distance from the baseline to the top of the ascent or a regular uppercase glyphs (cap line) is also known as the cap height.
Libgdx BitmapFont
The ascentis the distance from the cap height to the top of the tallest glyph.
=> 注意,与以上解释均不同
The descentis the distance from the bottom of the glyph that extends the lowest to the baseline.
The cap height is the distance from the top of most uppercase characters to the baseline.
getBounds(java.lang.CharSequence str): returns the size of the specified string. The heightis the distance from the top of most capital letters in the font (the cap height) to the baseline.
=> bounds height = cap height
AngleCode BMFont