Full text metrics for layout and intrinsic sizing. More...
#include <canvas.hpp>
Public Attributes | |
| float | width = 0 |
| Advance width of the text. | |
| float | ascent = 0 |
| Distance above baseline (positive value, ==fontBoundingBoxAscent). | |
| float | descent = 0 |
| Distance below baseline (positive value, ==fontBoundingBoxDescent). | |
| float | line_height = 0 |
| Recommended line spacing (ascent + descent + leading). | |
| float | actual_bounding_box_left = 0 |
| Distance from text origin to the left edge of the rendering bounding box. | |
| float | actual_bounding_box_right = 0 |
| Distance from text origin to the right edge of the rendering bounding box. | |
| float | actual_bounding_box_ascent = 0 |
| Distance from baseline to top of the rendering bounding box. | |
| float | actual_bounding_box_descent = 0 |
| Distance from baseline to bottom of the rendering bounding box. | |
Full text metrics for layout and intrinsic sizing.
Mirrors HTML5 TextMetrics — fields beyond width/ascent/descent are the bounding-box-only metrics required by CanvasRenderingContext2D. All values are positive and in pixels at the current font size.
| float pulp::canvas::Canvas::TextMetrics::actual_bounding_box_ascent = 0 |
Distance from baseline to top of the rendering bounding box.
| float pulp::canvas::Canvas::TextMetrics::actual_bounding_box_descent = 0 |
Distance from baseline to bottom of the rendering bounding box.
| float pulp::canvas::Canvas::TextMetrics::actual_bounding_box_left = 0 |
Distance from text origin to the left edge of the rendering bounding box.
Positive when the bounding box extends left of the origin.
| float pulp::canvas::Canvas::TextMetrics::actual_bounding_box_right = 0 |
Distance from text origin to the right edge of the rendering bounding box.
| float pulp::canvas::Canvas::TextMetrics::ascent = 0 |
Distance above baseline (positive value, ==fontBoundingBoxAscent).
| float pulp::canvas::Canvas::TextMetrics::descent = 0 |
Distance below baseline (positive value, ==fontBoundingBoxDescent).
| float pulp::canvas::Canvas::TextMetrics::line_height = 0 |
Recommended line spacing (ascent + descent + leading).
| float pulp::canvas::Canvas::TextMetrics::width = 0 |
Advance width of the text.