Skip to content

Latest commit

 

History

History
70 lines (57 loc) · 1.56 KB

README.md

File metadata and controls

70 lines (57 loc) · 1.56 KB

CustomFonts-Library-Android

A simple library to use custom fonts in text view.

Download

As a Gradle dependency

Simply add it in your root build.gradle at the end of repositories :

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

And add the dependency :

	dependencies {
	        compile 'com.github.felixgiov:CustomFonts-Library-Android:1.0.0'
	}

As a Maven dependency

Declare the dependency in Maven :

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Then, add the dependency :

	<dependency>
	    <groupId>com.github.felixgiov</groupId>
	    <artifactId>CustomFonts-Library-Android</artifactId>
	    <version>1.0.0</version>
	</dependency>

Usage

Add font in your assets/fonts folder

Add font path in values/strings.xml

    <string name="cloudier">fonts/Cloudier.ttf</string>

By default this CustomFonts uses Expressive Inks font. Credits

In layout xml.

    <felixgiov.lib.CustomFonts
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Custom Fonts Example"
        app:fontPath="@string/cloudier"/>