Calligraphy icon indicating copy to clipboard operation
Calligraphy copied to clipboard

font for whole app not working

Open moshlp opened this issue 5 years ago • 1 comments

hello, I've gone over the docs and tried everything but the fonts still don't show. This is what I've done so far:

  • Copied and pasted the fonts to assets/fonts (mind you, if I double click the ttf in Android Studio, it says "Unable to open font barlowregular.ttf")

  • Application class -> added ViewPump.init(ViewPump.builder() .addInterceptor(new CalligraphyInterceptor( new CalligraphyConfig.Builder() .setDefaultFontPath("fonts/barlowregular.ttf") .setFontAttrId(R.attr.fontPath) .build())) .build());

  • Added to every activity -> @Override protected void attachBaseContext(Context newBase) { super.attachBaseContext(ViewPumpContextWrapper.wrap(newBase)); }

thanks for any help!

moshlp avatar Aug 06 '20 14:08 moshlp

You tried with another ttf? ideally finding a "mobile" friendly one.

chrisjenx avatar Feb 19 '21 15:02 chrisjenx