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
If you try to draw inside a GraphicsView a rectangle having the size obtained by canvas.GetStringSize(string) and the actual string, you'll notice that for some strings the rectangle isn't high and wide enough to fully contain the string.
Here are two examples of strings involved in this behavior. "HELLO, WORLD!\nCiao mondo row 2\nGuten tag!?àèìòù@" "Ciaomondorowfdskle"
This problem has been discovered while trying to tackle #18572, where it has been found that a deprecated API was used for the iOS implementation of canvas.GetStringSize().
In #18621 the use of the correct API was introduced, but unfortunately it wasn't enough and even though that issue has been closed, the problem I described above keeps to be present. However, to solve this bug the edits carried by that PR have to be used.
A possible reason for this bug is described in #18621 (comment).
Description
If you try to draw inside a
GraphicsViewa rectangle having the size obtained bycanvas.GetStringSize(string)and the actualstring, you'll notice that for some strings the rectangle isn't high and wide enough to fully contain the string.Here are two examples of strings involved in this behavior.
"HELLO, WORLD!\nCiao mondo row 2\nGuten tag!?àèìòù@""Ciaomondorowfdskle"This problem has been discovered while trying to tackle #18572, where it has been found that a deprecated API was used for the iOS implementation of
canvas.GetStringSize().In #18621 the use of the correct API was introduced, but unfortunately it wasn't enough and even though that issue has been closed, the problem I described above keeps to be present. However, to solve this bug the edits carried by that PR have to be used.
A possible reason for this bug is described in #18621 (comment).
Possible related issue: #8486
Steps to Reproduce
canvas.GetStringSize()as in Fix PlatformStringSizeService on iOS/Catalyst to use correct API #18621These are the results.
Link to public reproduction project repository
https://github.com/Riccardo11/MauiIssues/tree/main/MeasureStringWrongBounds
Version with bug
8.0.0-rc.2.9511
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS16, iOS17. Couldn't test other versions
Did you find any workaround?
No
Relevant log output
No response