Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Android
  3. Calligraphy

Calligraphy

Apache-2.0Javav2.2.0

A library for easily applying custom fonts to Android TextViews without custom views or ViewTree traversal.

GitHubGitHub
8.5k stars1.1k forks0 contributors

What is Calligraphy?

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.

Target Audience

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.

Value Proposition

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.

Overview

Custom fonts in Android the easy way...

Use Cases

Best For

  • Applying custom fonts across an entire Android app with minimal code changes
  • Defining fonts in XML layouts for individual TextViews
  • Using consistent fonts through Android themes and styles
  • Supporting multiple typefaces within a single TextView using Spannables
  • Simplifying font management in large Android projects
  • Avoiding custom view subclasses just to set fonts

Not Ideal For

  • New Android projects or those targeting the latest API levels, as the library is deprecated and unsupported.
  • Applications built with Jetpack Compose or modern UI frameworks, since Calligraphy only works with traditional View-based layouts.
  • Teams requiring ongoing maintenance, security updates, or compatibility with future Android versions.
  • Projects where minimal third-party dependencies are preferred, due to the intrusive context wrapping and potential IDE errors.

Pros & Cons

Pros

XML Font Integration

Allows applying custom fonts directly in XML layouts using a custom fontPath attribute, eliminating the need for custom view subclasses or manual code.

Hierarchical Font Resolution

Supports font definition at multiple levels (View, Style, TextAppearance, Theme, Default), matching Android's native attribute resolution logic for consistency.

Spannable Support

Enables multiple typefaces within a single TextView using CalligraphyTypefaceSpan, as shown in the code example for dynamic text styling.

Theme and Style Consistency

Fonts can be defined in app themes and styles, ensuring uniform typography across the entire application with minimal boilerplate.

Cons

End-of-Life Status

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.

Intrusive Context Wrapping

Requires wrapping the base context in every Activity's attachBaseContext method, which adds boilerplate and can be error-prone in complex projects.

IDE Error Marking

The custom fontPath attribute is often incorrectly flagged as an error in Android Studio and IntelliJ, requiring additional tools:ignore attributes to suppress warnings.

Limited Framework Support

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.

Frequently Asked Questions

Quick Stats

Stars8,537
Forks1,083
Contributors0
Open Issues82
Last commit2 years ago
CreatedSince 2013

Tags

#textview#custom-fonts#android#ui#android-library#font-management#typography

Built With

A
Android

Included in

Android12.0k
Auto-fetched 1 day ago

Related Projects

Guava: Google Core Libraries for JavaGuava: Google Core Libraries for Java

Google core libraries for Java

Stars51,494
Forks11,145
Last commit1 day ago
RxJavaRxJava

RxJava – Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.

Stars48,292
Forks7,592
Last commit2 days ago
ZXing Android-IntegrationZXing Android-Integration

ZXing ("Zebra Crossing") barcode scanning library for Java, Android

Stars33,920
Forks9,431
Last commit4 days ago
RxAndroidRxAndroid

RxJava bindings for Android

Stars20,006
Forks2,941
Last commit1 month ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub