Description
Two related bounding box issues:
- BitmapText scaled: When a BitmapText is scaled, the debug bounding box doesn't match the rendered text size — it uses unscaled dimensions.
- Text textBaseline: The debug bounding box doesn't correctly align with rendered text when using different
textBaseline values ("bottom", "ideographic", "alphabetic", "middle", "hanging", "top").
Steps to reproduce
- Create scaled BitmapText or Text with different textBaseline settings
- Enable the debug plugin (shows green bounding boxes)
- Observe misaligned bounding boxes
Expected behavior
Bounding boxes should tightly wrap the rendered text regardless of scale or baseline setting.
Technical details
- BitmapText: scale factor not applied to measured text dimensions
- Text: y-position calculation in
TextMetrics.measureText() (textmetrics.js lines 116-122) uses simplified baseline-to-offset mapping that doesn't match actual canvas rendering
Description
Two related bounding box issues:
textBaselinevalues ("bottom", "ideographic", "alphabetic", "middle", "hanging", "top").Steps to reproduce
Expected behavior
Bounding boxes should tightly wrap the rendered text regardless of scale or baseline setting.
Technical details
TextMetrics.measureText()(textmetrics.js lines 116-122) uses simplified baseline-to-offset mapping that doesn't match actual canvas rendering