AdaptiveCards icon indicating copy to clipboard operation
AdaptiveCards copied to clipboard

TextBlock missing a "numerical" style

Open andrewleader opened this issue 9 years ago • 6 comments

When you start using larger font sizes, those also implicitly add more space to the top before the actual pixels for the characters start.

Therefore, without an option to trim that initial padding from the numbers, using large fonts for things like displaying a count becomes impossible.

For example, the following tile notification would not look correct, since the large "5" would actually be displayed several pixels lower, due to the larger line height of the larger font size.

image

andrewleader avatar Mar 05 '17 19:03 andrewleader

why doesn't separation.none work for this?

tomlm avatar Mar 09 '17 15:03 tomlm

I believe because the numeric style needs to remove the descender space from the text area, not just eliminate space after it.

ChrisWPDX avatar Mar 09 '17 16:03 ChrisWPDX

@anbare we're having a hard time visualizing this one, can you possibly provide a screenshot with the current and expected outcome?

matthidinger avatar Jul 04 '17 06:07 matthidinger

Here's the two examples. First one is what we would have today without a style that removes the descender space from the text area as Chris said, and the second image is what we would have if we introduced the style (which would be parity with Adaptive XML)

image image

andrewleader avatar Jul 09 '17 20:07 andrewleader

Seems to me that the second screenshot can be accomplished with the proposed new spacing model, which allows for more control. I thought this was more about aligning say the top bar of the 5 with the top edge of an image for instance; that indeed can't be done, but the above I think we will be fine.

dclaux avatar Jul 10 '17 02:07 dclaux

Closing as no active requests

andrewleader avatar Jun 11 '19 14:06 andrewleader