Skip to content

A sample of how to change normal font to custom based in your choice in some steps. (Arabic Fonts)

Notifications You must be signed in to change notification settings

AreejTurky/Custom-Font-Android-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Custom-Font-Android-Project

A sample of how to change normal font to custom based in ur choice in some tips.

Download the font

Search the font name for what you're looking for and download it in .ttf format

Create sub directoty in res folder

Under your project folder, create a file called "font" that will have your custom font Then, drag and drop what you have download in this file

Change the style.xml

Or in new versions "themes.xml" under themes folder (the 1st file) and write the follow, in my example i used "Times New Roman" from the following link https://fonts.google.com/?subset=arabic

<style name="TimesNewRoman"> @font/times_new_roman @font/times_new_roman normal </style>

Note:

You have to initalize it for android and font family. The name should be identical to the file you had downlaod.

Last step

You're now able to use your font in XML files. For my example i use it in TextView item. style="@style/TimesNewRoman"

Result

alt text

About

A sample of how to change normal font to custom based in your choice in some steps. (Arabic Fonts)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages