Add ImageText use_max_line_height()#9667
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
|
API: I'm not sure about adding a new public function to opt in to different calculations. Should this instead be the default? Tests: This is failing for me, with RAQM not installed: DetailsIt passes after |
I've corrected that test so that it is more tolerant for RAQM. It turns out it wasn't Windows that was causing the problem, it was RAQM.
Making it the default behaviour at the moment would cause 48 tests to fail, which I believe would result in a number of complaints from users about the change. An alternative is just to close #1646, and say that if users want to draw text like this, they can't use our multiline functionality. They have to draw individual lines of text and calculate the next position themselves. |
Resolves #1646. Alternative to #9581
Currently, the bottom of the bounding box of the text "A" is used to determine text line height.
#1646 found that other characters may have larger text height, leading to overlap between lines of text. While this is hard to see with most fonts, I found Great Vibes.
gives

This PR adds

use_max_line_height()to ImageText. If I call that, the largest bounding box from all of the characters in the given text is used (not all possible characters of the font). Using that method, I get