Flutter Engine
The Flutter Engine
|
#include <SkFontMetrics.h>
Public Types | |
enum | FontMetricsFlags { kUnderlineThicknessIsValid_Flag = 1 << 0 , kUnderlinePositionIsValid_Flag = 1 << 1 , kStrikeoutThicknessIsValid_Flag = 1 << 2 , kStrikeoutPositionIsValid_Flag = 1 << 3 , kBoundsInvalid_Flag = 1 << 4 } |
Public Member Functions | |
bool | operator== (const SkFontMetrics &that) const |
bool | hasUnderlineThickness (SkScalar *thickness) const |
bool | hasUnderlinePosition (SkScalar *position) const |
bool | hasStrikeoutThickness (SkScalar *thickness) const |
bool | hasStrikeoutPosition (SkScalar *position) const |
bool | hasBounds () const |
Public Attributes | |
uint32_t | fFlags |
FontMetricsFlags indicating which metrics are valid. More... | |
SkScalar | fTop |
greatest extent above origin of any glyph bounding box, typically negative; deprecated with variable fonts More... | |
SkScalar | fAscent |
distance to reserve above baseline, typically negative More... | |
SkScalar | fDescent |
distance to reserve below baseline, typically positive More... | |
SkScalar | fBottom |
greatest extent below origin of any glyph bounding box, typically positive; deprecated with variable fonts More... | |
SkScalar | fLeading |
distance to add between lines, typically positive or zero More... | |
SkScalar | fAvgCharWidth |
average character width, zero if unknown More... | |
SkScalar | fMaxCharWidth |
maximum character width, zero if unknown More... | |
SkScalar | fXMin |
greatest extent to left of origin of any glyph bounding box, typically negative; deprecated with variable fonts More... | |
SkScalar | fXMax |
greatest extent to right of origin of any glyph bounding box, typically positive; deprecated with variable fonts More... | |
SkScalar | fXHeight |
height of lower-case 'x', zero if unknown, typically negative More... | |
SkScalar | fCapHeight |
height of an upper-case letter, zero if unknown, typically negative More... | |
SkScalar | fUnderlineThickness |
underline thickness More... | |
SkScalar | fUnderlinePosition |
distance from baseline to top of stroke, typically positive More... | |
SkScalar | fStrikeoutThickness |
strikeout thickness More... | |
SkScalar | fStrikeoutPosition |
distance from baseline to bottom of stroke, typically negative More... | |
The metrics of an SkFont. The metric values are consistent with the Skia y-down coordinate system.
Definition at line 18 of file SkFontMetrics.h.
FontMetricsFlags indicate when certain metrics are valid; the underline or strikeout metrics may be valid and zero. Fonts with embedded bitmaps may not have valid underline or strikeout metrics.
Definition at line 44 of file SkFontMetrics.h.
|
inline |
Returns true if SkFontMetrics has a valid fTop, fBottom, fXMin, and fXMax. If the bounds are not valid, return false.
Definition at line 134 of file SkFontMetrics.h.
|
inline |
Returns true if SkFontMetrics has a valid strikeout position, and sets position to that value. If the underline position is not valid, return false, and ignore position.
position | storage for strikeout position |
Definition at line 121 of file SkFontMetrics.h.
|
inline |
Returns true if SkFontMetrics has a valid strikeout thickness, and sets thickness to that value. If the underline thickness is not valid, return false, and ignore thickness.
thickness | storage for strikeout width |
Definition at line 106 of file SkFontMetrics.h.
|
inline |
Returns true if SkFontMetrics has a valid underline position, and sets position to that value. If the underline position is not valid, return false, and ignore position.
position | storage for underline position |
Definition at line 91 of file SkFontMetrics.h.
|
inline |
Returns true if SkFontMetrics has a valid underline thickness, and sets thickness to that value. If the underline thickness is not valid, return false, and ignore thickness.
thickness | storage for underline width |
Definition at line 76 of file SkFontMetrics.h.
|
inline |
Definition at line 19 of file SkFontMetrics.h.
SkScalar SkFontMetrics::fAscent |
distance to reserve above baseline, typically negative
Definition at line 54 of file SkFontMetrics.h.
SkScalar SkFontMetrics::fAvgCharWidth |
average character width, zero if unknown
Definition at line 58 of file SkFontMetrics.h.
SkScalar SkFontMetrics::fBottom |
greatest extent below origin of any glyph bounding box, typically positive; deprecated with variable fonts
Definition at line 56 of file SkFontMetrics.h.
SkScalar SkFontMetrics::fCapHeight |
height of an upper-case letter, zero if unknown, typically negative
Definition at line 63 of file SkFontMetrics.h.
SkScalar SkFontMetrics::fDescent |
distance to reserve below baseline, typically positive
Definition at line 55 of file SkFontMetrics.h.
uint32_t SkFontMetrics::fFlags |
FontMetricsFlags indicating which metrics are valid.
Definition at line 52 of file SkFontMetrics.h.
SkScalar SkFontMetrics::fLeading |
distance to add between lines, typically positive or zero
Definition at line 57 of file SkFontMetrics.h.
SkScalar SkFontMetrics::fMaxCharWidth |
maximum character width, zero if unknown
Definition at line 59 of file SkFontMetrics.h.
SkScalar SkFontMetrics::fStrikeoutPosition |
distance from baseline to bottom of stroke, typically negative
Definition at line 67 of file SkFontMetrics.h.
SkScalar SkFontMetrics::fStrikeoutThickness |
strikeout thickness
Definition at line 66 of file SkFontMetrics.h.
SkScalar SkFontMetrics::fTop |
greatest extent above origin of any glyph bounding box, typically negative; deprecated with variable fonts
Definition at line 53 of file SkFontMetrics.h.
SkScalar SkFontMetrics::fUnderlinePosition |
distance from baseline to top of stroke, typically positive
Definition at line 65 of file SkFontMetrics.h.
SkScalar SkFontMetrics::fUnderlineThickness |
underline thickness
Definition at line 64 of file SkFontMetrics.h.
SkScalar SkFontMetrics::fXHeight |
height of lower-case 'x', zero if unknown, typically negative
Definition at line 62 of file SkFontMetrics.h.
SkScalar SkFontMetrics::fXMax |
greatest extent to right of origin of any glyph bounding box, typically positive; deprecated with variable fonts
Definition at line 61 of file SkFontMetrics.h.
SkScalar SkFontMetrics::fXMin |
greatest extent to left of origin of any glyph bounding box, typically negative; deprecated with variable fonts
Definition at line 60 of file SkFontMetrics.h.