Introducing CustomType, An Android Library For The Typography Enthusiast

All across our tech stack at Haptik, we’ve benefitted enormously from the Open Source community. And every one of us, right from day 1, had a personal goal of wanting to give back in some form, big or small. Today, we have the privilege of announcing our first contribution: CustomType for Android.

bart_os

Being a messaging app, typography plays an important part of our design. However, using custom typefaces within an Android app isn’t easy: there are limitations which prevent us from specifying the typeface in the layout XML file itself, and also performance issues to be handled while creating the Typeface objects in the Java code.

To handle these issues, we had written CustomType in the middle of last year.¬†While in truth it’s a very, very small library (the aar is only 5kb), it’s impact is huge since it handles the two issues outlined earlier. And it does so with minimal programming. In fact, while implementing in Java, CustomType decreases the amount of code you need to write. All you need to do is

You can also use custom typefaces from the XML files, though this would require you to use a bundled custom TextView instead of the standard TextView.

We’ve also bundled a few useful resources, such as Lorem Ipsum of three different lengths, and the type sizes as per the Material Design spec and colors that the spec recommends for type.

To get started with CustomType, head over to the repository on Github.

Share
Written by:

The Product Manager - Mobile & Chief Meme Officer at Haptik, Raveesh previously founded Twocents, a movie recommendation app, and Apps Culture, one of India's First Android-focused mobile app studios. He is also only the third person in the world to be named a Google Developer Expert for UX/Design