victory icon indicating copy to clipboard operation
victory copied to clipboard

Fix label spacing and text size approximation to support non-latin characters and RTL

Open becca-bailey opened this issue 3 years ago • 3 comments

This is an issue to overhaul how label size is determined. Right now, label size is approximated using the size of specific characters in specific fonts, but this does not adapt to custom fonts, non-Latin character sets, and RTL text.

This solution might require some discussion - right now the only proposed fix for this would be to pre-render the text with a CSS rule like visibility: hidden, measure the text, and re-render the text with the correct spacing. Are there other solutions to this problem?

Note for contributors: This issue is most likely a medium time commitment (1 week or more), but doesn't touch as much of the complex Victory internals.

becca-bailey avatar Feb 15 '22 01:02 becca-bailey

Most of this work is currently being done in textsize.js.

becca-bailey avatar Feb 15 '22 20:02 becca-bailey

@becca-bailey did you added feature to support charts for RTL?

zaidqureshi95 avatar Dec 11 '23 13:12 zaidqureshi95

@becca-bailey @boygirl Is RTL supported on victory-native charts now?

BhargaviAnnadevara avatar Mar 29 '24 21:03 BhargaviAnnadevara