androidfontscalligraphy

After some period of time some symbols become bold Android 4-5


After some period of time, some symbols become bold on Android 4-5. We use custom font ubuntг and library Calligraphy.

This is the code we use to work with Calligrapy:

    @Override protected void attachBaseContext(Context newBase) {
        super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase));
      }

CalligraphyUtils.applyFontToTextView(this, TypefaceUtils.load(assets, App.UBUNTU_REGULAR_TYPEFACE))

This is how it looks

enter image description here

UPDATE:

After using standard Android way everything become ok


Solution

  • This is a know issue since 2017, the problem is "Probably" related to Locale settings. When your app goes background and foreground your device Locale changes and Calligraphy can't handle this so the symbols revert themselves.

    Unfortunately the author is not good at tracking/fixing the issues, as you can see there are 110 open issues

    This is the issue related to your problem, it's still open.