Auto X-Scale Resizing
GoYamazaki opened this issue · 1 comments
Summary
auto_size_text automatically adjusts its content's text size so that it will fit in their given layout.
As an alternative option, I want to fix the content's X-scale and place it in the given layout so that I could show its full content without changing the text's height.
For describing my feature request, I created a sample app and capture that demonstrates the behavior of 3 text widgets.
auto-xscale-demo.mp4
- The first TextWidget with red color represents Flutter's original text widgets with these parameters
Text(
content,
style:
TextStyle(color: Colors.red, fontSize: fontSize),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
- The second TextWidget with green color represents the auto_size_text with these parameters.
AutoSizeText(
content,
maxLines: 1,
style: TextStyle(
color: Colors.green, fontSize: fontSize),
),
- The third text-widget with blue color represents the sample I am trying to add to this package.
Describe alternatives you've considered
This may sound improper in the UI/UX perspective (especially in western typography),
but I want this feature by transforming the text's X-scale because of these reasons.
- In Japanese Fonts, fonts are meant to be squashed if needed in order to fit in the given space. Those are designed in that way.
- ref. Sorry, in Japanese only.
- Preparing condensed fonts for every language is very costly.
- Since the Flutter engine does not support text's width for now, I just want the alternative solution to fulfill our demand.
Version
Flutter version: 2.10.3
auto_size_text version: 3.0.0
@leisim
Sorry, just checking for updates.
It will be nice if you check this issue with us. Thank you.