simc / auto_size_text

Flutter widget that automatically resizes text to fit perfectly within its bounds.
https://pub.dev/packages/auto_size_text
MIT License
2.06k stars 240 forks source link

AutoSizeText Not work correctly on iOS when set Accessibility -> Display & Text Size -> Bold Text #119

Open dodatw opened 2 years ago

dodatw commented 2 years ago

AutoSizeText is very useful package. It work perfect before I found this issue.

The Text not adjust to right size when User enable Bold text in System (iOS) Setting -> Accessibility -> Display & Text Size -> Bold Text

After enable this item in system, some text be Crop.

Version

TomTom0815 commented 2 years ago

I can confirm that this is a bug. I ran into the same problem with iOS accessibility feature messing with autosize text.

Here's my workaround for the problem (basically, it overrides the accessibility settings - which is not a good idea, as this feature is useful for users with visual impairments)

MaterialApp
        builder: (context, child) {
          return MediaQuery(
            data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0, boldText: false),
            child: child ?? Container(),
          );
        },