You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The original PR #378 added better support for text rendering of multi-line text and respecting the canvas size when calling Canvas2D.drawText to not cause a breaking change for everyone, the PR was focused on the advanced text renderer and was opt-in behavior. As part of that when the line height was larger than the font the size of the canvas that the text was positioned in was sized by the line height.
Now, the canvas size of the text is larger than it should be. See PR #378 for the original screenshots showing the screenshots demonstrating the canvas sizing.
Code from PR would render as such:
After upgrading same code now renders same result as:
The text was updated successfully, but these errors were encountered:
itsjamie
changed the title
Regression with fontBaselineRatio and advanced text renderer for line height.
Regression with advanced text renderer and line height.
May 25, 2023
Hey @itsjamie, thanks for bringing up this issue and your explanations.
From my understanding, PR #378 was initially included in the v2.7.0 release. However, during the development process leading up to the v2.9.0 release, issue #428 was reported and subsequently addressed by PR #432, which was included in v2.9.0. As a result, PR #432 made modifications to the behavior introduced by PR #378, specifically the code below was removed:
To better understand the recent change (#432) and its impact on the behavior, it would be great if we could get some feedback from @g-zachar and gather more details from his perspective.
The original PR #378 added better support for text rendering of multi-line text and respecting the canvas size when calling
Canvas2D.drawText
to not cause a breaking change for everyone, the PR was focused on the advanced text renderer and was opt-in behavior. As part of that when the line height was larger than the font the size of the canvas that the text was positioned in was sized by the line height.This commit removed that behavior 4f0b248.
Now, the canvas size of the text is larger than it should be. See PR #378 for the original screenshots showing the screenshots demonstrating the canvas sizing.
Code from PR would render as such:
After upgrading same code now renders same result as:
The text was updated successfully, but these errors were encountered: