chrisjenx / Calligraphy

Custom fonts in Android the easy way...
Apache License 2.0
8.59k stars 1.1k forks source link

Custom fonts already possible in latest Support Library? #410

Closed azri92 closed 5 years ago

azri92 commented 7 years ago

Hi! Looking at the issue on google you mentioned in your documentation, looks like it's already supported in the latest release of the Support Library. Maybe you can update the doc to show why developers should use this library regardless?

azri92 commented 6 years ago

I guess one reason I'm still using this library is because custom font support, even with the support library, is currently still difficult. So, until things improve (perhaps when Android Studio 3 is officially out) I'll keep using this. Thanks for a nice library 👍

ruha9005 commented 6 years ago

I also think this lib is deprecated now https://segunfamisa.com/posts/custom-fonts-with-android-support-library

azri92 commented 6 years ago

If anyone's wondering why I still use this library, here's my story on Twitter: https://twitter.com/azriaba/status/978832315613786112

TLDR; I couldn't get bold & italics to work properly with custom fonts on certain phones.

azri92 commented 6 years ago

Oh, I guess I found a "solution". Instead of creating a font family file, calling the font file directly with the android:fontFamily attribute solved my problem.. but the docs never mentioned anything about that.

chrisjenx commented 5 years ago

So yes it's offically supported, but 1. its API 26+, most people don't use that yet! 2. Not all devices have play services app... YMMV

emartynov commented 5 years ago

@chrisjenx, if you use support library it will work from Android 4.1 (https://developer.android.com/guide/topics/ui/look-and-feel/fonts-in-xml). You also don't need any play services for this feature.

emartynov commented 5 years ago

So I agree with the starter of the issue that technically Calligraphy is not required anymore.