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
FormattedText provides a width/height of the line, which has two potential meanings in the presence of text decorations like shadows, underlines etc.
In standard web contexts, text decorations do not contribute to text size for the purposes of computing overflow (scrollbars) or otherwise have any impact on how the text is laid out. This is an important principle: text decorations do not affect layout. This argues for not including decorations in the metrics, if only because it would make it possible to reproduce standard HTML line layout when rendered.
But when rendering lines in a canvas, maybe you want to know how much bigger the painted area is when shadows and decorations are applied. In particular, you may wish to prevent visual overlap. Such information could be provided; it is the ink overflow.
The obvious options are to define it as one or the other, or provide both, or make it a parameter. I lean toward defining it as the scrollable overflow size.
The text was updated successfully, but these errors were encountered:
FormattedText provides a width/height of the line, which has two potential meanings in the presence of text decorations like shadows, underlines etc.
In standard web contexts, text decorations do not contribute to text size for the purposes of computing overflow (scrollbars) or otherwise have any impact on how the text is laid out. This is an important principle: text decorations do not affect layout. This argues for not including decorations in the metrics, if only because it would make it possible to reproduce standard HTML line layout when rendered.
But when rendering lines in a canvas, maybe you want to know how much bigger the painted area is when shadows and decorations are applied. In particular, you may wish to prevent visual overlap. Such information could be provided; it is the ink overflow.
The obvious options are to define it as one or the other, or provide both, or make it a parameter. I lean toward defining it as the scrollable overflow size.
The text was updated successfully, but these errors were encountered: