-
Notifications
You must be signed in to change notification settings - Fork 6k
TextStyle.height property as a multiple of font size instead of multiple of ascent+descent+leading. #9041
Conversation
|
Still need to make the equivalent change for strut |
jason-simmons
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation LGTM
|
Waiting a bit before landing to give people an opportunity to comprehend and comment on this change. Breaking change announcement sent today. |
|
cc @tgrikas |
|
Waiting on current rolling status to clear up and become smoother before attempting this. |
|
approach SGTM (it's what we talked about) |
goderbauer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for the dart files
|
@GaryQian do you plan to rebase and merge this PR? |
|
Update: Still in my queue, dealing with some other crasher issues that came up in between. Should be able to get back to this soon. |
|
Update: Holding off on committing this until the tree is in a position to take riskier changes. Due to the very breaking nature of this change, the delay will allow for a much more flexible and longer period of time to work with breakages that this causes. |
|
New diagram: flutter/assets-for-api-docs#90 |
…of multiple of ascent+descent+leading. (flutter/engine#9041)
…of multiple of ascent+descent+leading. (flutter/engine#9041)
…of multiple of ascent+descent+leading. (flutter/engine#9041)
…of multiple of ascent+descent+leading. (flutter/engine#9041)
…of multiple of ascent+descent+leading. (flutter/engine#9041)
|
Can you post a link to the breaking change announcement that was sent out for this (and also add the announcement link to the changelog)? This is also listed in the changelog as being in |
|
Yes, here is the announcement. https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/flutter-announce/ZmnseDOW9Wc/5K7xD0V8BwAJ I may have put it under the wrong z version number, I'll fix it! The dev release it is in is still under review. |
|
Thanks! I updated the changelog accordingly. For archeologists, this was rolled into the framework in flutter/flutter#35814 |
In order to better match the API description of
TextStyle.height, this ensures that the height of the line is exactlyfontSize * heightlogical pixels tall when a height is specified. When unspecified/omitted, the font's height will be used, which may be taller or shorter then the EM square.This is a breaking change, even though it brings behavior back in line with the description.
Even though this changes a very fundamental API, it seems to not break as much as expected. Most implementations are not as dependent on the height property as I had suspected.
Fixes flutter/flutter#29479