Check out this Paper.js sketch . Press "TEXT" to see the bounding box. Note that I set the property leading
to the same as the font size. By default, this is 1.2 times the font size, according to the documentation .
Why is there a space with an edge at the bottom of the PointText? How can it be removed so that the bounding box wraps the text strongly? Alternatively, how can we determine the y value of the true baseline of the text, and not what we are currently giving?
EDIT
The "margin" below is for letters that have descenders, for example q and p. So the real question here is, how can I get the y coordinate of the baseline for a PointText? I need a baseline because this is how we use the insert text in another library and the insert must be identical.
source
share