Fontize is an Android library that enables multi-font selection functionality to diversify your app.

Overview

Fontize Android Library

Fontize Android Library Licence Fontize Android Library Licence Fontize Android Library Licence Fontize Android Library Stars Fontize Android Library Forks Fontize Android Library Issues
Built with ❤︎ by Gourav Khunger

Fontize is an Android library, written in kotlin, that enables your android app have multiple fonts for your TextViews and switch between them in a jiffy!

A quick demo:

Fontize Android Library Demo GIF

Adding Fontize to your project

Include jitpack in your root build.gradle file.

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

And add it's dependency to your app level build.gradle file:

dependencies {
	    implementation 'com.github.gouravkhunger:Fontize:1.0.0'
}

Sync the project and you'll have imported Fontize successfully.

Start using Fontize

Make sure you have all your fonts in the res/font/ directory. Support for font files in the assets folder will ship soon!

Rename all the TextViews or AppCompatTextViews in your project to com.github.gouravkhunger.fontize.FontizeTextView - You don't have to change anything else, and the view would still perform the same :)

Before:

">

  

After:

">

  

To set up a default font for the TextViews that should load at the startup, add this line to the beginning of your launcher activity:

Fontize(this).setDefaultFont(R.font.irish_grover) // replace with your own font

To update the font for all of your app, simple call this line from anywhere inside the app:

Fontize(this).updateFont(R.font.zen_old_mincho)

Note:

  • this must be an Acitvity or Application context.
  • This requires recreation of the activity, which can be done by recreate(), or prompt the user to relaunch the app to make the changes take effect.

How it works?

Fontize saves the resource ID of the font you provide to SharedPreferences. It extends AppCompatTextView class to inherit all the properties of a TextView, but overrides the default inflating behaviour. It applies the typography when the view is inflated.

Only TextViews?

I'll try to add support for other views in the future. Contributions are always welcome.

🛡 License

This project is MIT Licensed.

MIT License

Copyright (c) 2021 Gourav Khunger

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

There are some fonts used in the demo app, their licenses are available here.


Fontize needs a from you =)
You might also like...
Custom font library for android | Library to change/add font of Entire Android Application at once without wasting your time - TextViews, EditText, Buttons, Views etc.,

AppFontChanger In a Single shot change font of Entire Android Application - TextViews, EditText, Buttons, Views etc., Kindly use the following links t

An ActivityScenario extension and a Junit4 TestRule to simulate changing the font size on a device/emulator, as it would be done by going to Settings display Font size

FontSizeActivityScenario and FontSizeTestRule An ActivityScenario and a Junit4 TestRule to be used together with its org.junit.runners.Parameterized.

Android Spinner Dialog Library supported on both Java and Kotlin, Use for single or multi selection of choice
Android Spinner Dialog Library supported on both Java and Kotlin, Use for single or multi selection of choice

SpinnerDialog Android Spinner Dialog Library, Use for single or multi selection of choice Android UI Download To include SpinnerDialog in your project

A tool that enables advanced features through adb installing and uninstalling apps like wildcards and multi device support. Useful if you want to clean your test device from all company apks or install a lot of apks in one go.  Written in Java so it should run on your platform. A tool that enables advanced features through adb installing and uninstalling apps like wildcards and multi device support. Useful if you want to clean your test device from all company apks or install a lot of apks in one go.  Written in Java so it should run on your platform. 👇 Easy Google Photos style multi-selection for RecyclerViews, powered by Kotlin and AndroidX.
👇 Easy Google Photos style multi-selection for RecyclerViews, powered by Kotlin and AndroidX.

Drag Select Recycler View This library allows you to implement Google Photos style multi-selection in your apps! You start by long pressing an item in

KT Search - a kotlin multi-platform library that provides client functionality for Elasticsearch and Opensearch

KT Search Client KT Search is a kotlin multi-platform library that provides client functionality for Elasticsearch and Opensearch. It builds on other

Android library project for providing multiple image selection from the device.
Android library project for providing multiple image selection from the device.

PolyPicker Android library project for selecting/capturing multiple images from the device. Result Caution! Eclipse library project structure has been

Android library that provides for multiple image selection.
Android library that provides for multiple image selection.

#MultipleImageSelect An android library that allows selection of multiple images from gallery. It shows an initial album (buckets) chooser and then im

Awesome Image Picker library will pick images/gifs with beautiful interface. Supports image or gif, Single and Multiple Image selection.

Awesome Image Picker Awesome Image Picker library will pick images/gifs with beautiful interface. Supports image or gif, Single and Multiple Image sel

Android-Iconics - Use any icon font, or vector (.svg) as drawable in your application.
Android-Iconics - Use any icon font, or vector (.svg) as drawable in your application.

Android-Iconics ... allows to include any icon font with all its vector icons in your project. No limits. Scale with no limit, use any color at any ti

An extension of Android's TextView, EditText and Button that let's you use the font of your choice

AnyTextView (deprecated) Note: AnyTextView is no longer being maintained. I recommend replacing AnyTextView with the Calligraphy library instead. Frus

Android - A ListView adapter with support for multiple choice modal selection
Android - A ListView adapter with support for multiple choice modal selection

MultiChoiceAdapter MultiChoiceAdapter is an implementation of ListAdapter which adds support for modal multiple choice selection as in the native Gmai

:octocat: ≡ DirectSelect is a selection widget with an ethereal, full-screen modal popup displaying the available choices when the widget is interact with.
:octocat: ≡ DirectSelect is a selection widget with an ethereal, full-screen modal popup displaying the available choices when the widget is interact with.

DIRECT SELECT [JAVA] Selection widget with an ethereal, full-screen modal popup displaying the available choices We specialize in the designing and co

A beautiful material calendar with endless scroll, range selection and a lot more!
A beautiful material calendar with endless scroll, range selection and a lot more!

CrunchyCalendar A light, powerful and easy to use Calendar Widget with a number out of the box features: Infinite vertical scrolling in both direction

A menu consisting of icons (ImageViews) and metaball bouncing selection to give a blob effect. Inspired by Material design

Metaball-Menu A menu consisting of icons (ImageViews) and metaball bouncing selection to give a blob effect. Inspired by Material design ScreenShot Us

🚀🏞💪 Collection of Images, Modifiers, utility functions for Jetpack Compose to expand and enrich displaying, manipulating, scaling, resizing, zooming, and getting cropped ImageBitmap based on selection area

Collection of Images, Modifiers, utility functions for Jetpack Compose to expand and enrich displaying, manipulating, scaling, resizing, zooming, and getting cropped ImageBitmap based on selection area, before/after image to with handle to show partial of both images and more is cooking up

A TextView library that allows the user to increase/decrease font size with a two finger gesture by the user.
A TextView library that allows the user to increase/decrease font size with a two finger gesture by the user.

PinchZoomTextView Library This library allows you to have a TextView that will grow/shrink the font size using gestures from the user. Usage To have a

A Basic Drawing App which is having Functionality of importing images from your gallery and sharing your drawing via Whatsapp , Email

Drawing-App A Basic Drawing App made in Kotlin Features of the App :) 1.you can set the size of paint Brush 2.import images from gallery 3.share it vi

Releases(1.0.1)
Owner
Gourav Khunger
Android app developer
Gourav Khunger
A full example of custom fonts in XML using data binding and including font caching.

[Deprecated] Fonts in XML are now supported by the Android support library as of 26.0, including in styles and themes. I recommend using the support l

Lisa Wray 776 Sep 24, 2022
help you change the module font easily.(方便快速的为应用内所有组件更换字体)

FontsManager 有待重构 English Readme please cilick here 字体管理器,方便快速的为应用内所有组件更换字体。 作者微博: @GcsSloop Demo演示 如何添加 1.在Project的build.gradle中添加仓库地址 allprojects {

sloop 479 Nov 29, 2022
A lightweight Android library for use iconic fonts.

Print A lightweight Android library for use iconic fonts. Download Gradle: compile 'com.github.johnkil.print:print:1.3.1' Maven: <dependency> <gro

Evgeny Shishkin 202 Dec 27, 2022
A lightweight Android library for use iconic fonts.

Print A lightweight Android library for use iconic fonts. Download Gradle: compile 'com.github.johnkil.print:print:1.3.1' Maven: <dependency> <gro

Evgeny Shishkin 202 Dec 27, 2022
An android library to display FontAwesome Icons in any View or a MenuItem

DroidAwesome A library to display FontAwesome Icons in any View or a MenuItem Views Supported: TextView AutoComplete TextView EditText Switch CheckBox

Livin 38 Aug 25, 2022
Android Library to use custom fonts with ease.

FontometricsLibrary A Simple Android Library to use Custom Fonts with Ease. Use Customs Fonts in your Android project without adding any .ttf/.otf in

Ishmeet Singh 188 Nov 15, 2022
A library that gives full control over text related technologies such as bidirectional algorithm, open type shaping, text typesetting and text rendering

Tehreer-Android Tehreer is a library which gives full control over following text related technologies. Bidirectional Algorithm OpenType Shaping Engin

Tehreer 61 Dec 15, 2022
Custom fonts in Android the easy way...

This version of Calligraphy has reached its end-of-life and is no longer maintained. Please migrate to Calligraphy 3! Calligraphy Custom fonts in Andr

Christopher Jenkins 8.6k Jan 3, 2023
Typeface helper for Android

Android Typeface Helper Android lacks proper support for custom typefaces. Most obvious method of defining typeface for UI elements via XML attributes

Norbsoft Sp. z o.o. 756 Aug 8, 2022
Helper object for injecting typeface into various text views of android.

TypefaceHelper Helper object for injecting typeface into various text views of android. Overview We can use various custom typefaces asset for any tex

Drivemode, Inc. 105 Nov 25, 2022