-
-
Notifications
You must be signed in to change notification settings - Fork 657
Text/BitmapText bounding box incorrect when scaled or using different textBaseline #1345
Copy link
Copy link
Open
Description
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
textBaselinevalues ("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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels