A library for easily applying custom fonts to Android TextViews without custom views or ViewTree traversal.
Calligraphy is an Android library that provides a simple way to apply custom fonts to TextViews without creating custom views or manually traversing the view hierarchy. It solves the problem of cumbersome font management in Android by allowing developers to define fonts directly in XML layouts, styles, and themes.
Android developers who need to use custom fonts in their applications and want to avoid the complexity of custom views or manual font setting in code.
Developers choose Calligraphy because it drastically reduces boilerplate code, integrates seamlessly with Android's existing styling system, and provides a clear, hierarchical approach to font resolution that matches Android's attribute resolution logic.
Custom fonts in Android the easy way...
Allows applying custom fonts directly in XML layouts using a custom fontPath attribute, eliminating the need for custom view subclasses or manual code.
Supports font definition at multiple levels (View, Style, TextAppearance, Theme, Default), matching Android's native attribute resolution logic for consistency.
Enables multiple typefaces within a single TextView using CalligraphyTypefaceSpan, as shown in the code example for dynamic text styling.
Fonts can be defined in app themes and styles, ensuring uniform typography across the entire application with minimal boilerplate.
The library is no longer maintained, with no updates, bug fixes, or support, and users are advised to migrate to Calligraphy 3, risking compatibility issues.
Requires wrapping the base context in every Activity's attachBaseContext method, which adds boilerplate and can be error-prone in complex projects.
The custom fontPath attribute is often incorrectly flagged as an error in Android Studio and IntelliJ, requiring additional tools:ignore attributes to suppress warnings.
Does not support modern Android UI frameworks like Jetpack Compose, and has known issues with widgets like SwitchCompat that require custom subclasses for proper typeface setting.
Google core libraries for Java
RxJava – Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.
ZXing ("Zebra Crossing") barcode scanning library for Java, Android
RxJava bindings for Android
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.