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
In order to layout text fragments precisely, it's sometimes necessary to add horizontal (left and right) spacing (i.e., padding) to the text. One example is when you want to draw a border around the text or apply a background color. Without the padding, the border/background runs right up against the text. While it's possible to have the border/background extend away from the text, it steals space from between the words. So what's needed is adding padding around the text.
One relatively simple way to support this would be to allow the width of a fragment to be specified. Then the application could be responsible for figuring out how much additional width is needed. But this width needs to be considered when laying out the fragment on the line (the wrap logic).
The current workaround is to add a thin space character on either side of the text. However, the width of thin spaces in fonts vary, so it's hard to control the exact amount of padding that gets added.
The text was updated successfully, but these errors were encountered:
After I opened this issue, I realized it is already possible to specify the width and alignment of the fragment. So the question becomes, how to do we best determine the width so that the width can be expanded. Perhaps this is an application issue. I'd certainly be interested in a horizontal padding, because it would make it easier, but it's fair to say I could make it work without that support.
In order to layout text fragments precisely, it's sometimes necessary to add horizontal (left and right) spacing (i.e., padding) to the text. One example is when you want to draw a border around the text or apply a background color. Without the padding, the border/background runs right up against the text. While it's possible to have the border/background extend away from the text, it steals space from between the words. So what's needed is adding padding around the text.
One relatively simple way to support this would be to allow the width of a fragment to be specified. Then the application could be responsible for figuring out how much additional width is needed. But this width needs to be considered when laying out the fragment on the line (the wrap logic).
The current workaround is to add a thin space character on either side of the text. However, the width of thin spaces in fonts vary, so it's hard to control the exact amount of padding that gets added.
The text was updated successfully, but these errors were encountered: