Skia
2DGraphicsLibrary
|
Public Types | |
enum | FontMetricsFlags { kUnderlineThicknessIsValid_Flag = 1 << 0, kUnderlinePositionIsValid_Flag = 1 << 1 } |
Flags which indicate the confidence level of various metrics. More... | |
Public Member Functions | |
bool | hasUnderlineThickness (SkScalar *thickness) const |
If the fontmetrics has a valid underline thickness, return true, and set the thickness param to that value. More... | |
bool | hasUnderlinePosition (SkScalar *position) const |
If the fontmetrics has a valid underline position, return true, and set the position param to that value. More... | |
Public Attributes | |
uint32_t | fFlags |
Bit field to identify which values are unknown. | |
SkScalar | fTop |
The greatest distance above the baseline for any glyph (will be <= 0) | |
SkScalar | fAscent |
The recommended distance above the baseline (will be <= 0) | |
SkScalar | fDescent |
The recommended distance below the baseline (will be >= 0) | |
SkScalar | fBottom |
The greatest distance below the baseline for any glyph (will be >= 0) | |
SkScalar | fLeading |
The recommended distance to add between lines of text (will be >= 0) | |
SkScalar | fAvgCharWidth |
the average character width (>= 0) | |
SkScalar | fMaxCharWidth |
the max character width (>= 0) | |
SkScalar | fXMin |
The minimum bounding box x value for all glyphs. | |
SkScalar | fXMax |
The maximum bounding box x value for all glyphs. | |
SkScalar | fXHeight |
The height of an 'x' in px, or 0 if no 'x' in face. | |
SkScalar | fCapHeight |
The cap height (> 0), or 0 if cannot be determined. | |
SkScalar | fUnderlineThickness |
underline thickness, or 0 if cannot be determined | |
SkScalar | fUnderlinePosition |
Underline Position - position of the top of the Underline stroke relative to the baseline, this can have following values. More... | |
Flags which indicate the confidence level of various metrics.
A set flag indicates that the metric may be trusted.
|
inline |
If the fontmetrics has a valid underline position, return true, and set the position param to that value.
If it doesn't return false and ignore the position param.
|
inline |
If the fontmetrics has a valid underline thickness, return true, and set the thickness param to that value.
If it doesn't return false and ignore the thickness param.
SkScalar SkPaint::FontMetrics::fUnderlinePosition |
Underline Position - position of the top of the Underline stroke relative to the baseline, this can have following values.