5,597,138 Members 44,052 Now Online
XDA Developers Android and Mobile Development Forum

[How To] Manually Change System (And Other) Fonts

Tip us?
 
c_live_lee
Old
(Last edited by c_live_lee; 16th March 2014 at 02:34 AM.)
#1  
c_live_lee's Avatar
Senior Member - OP
Thanks Meter 578
Posts: 2,406
Join Date: Sep 2010
Location: Augusta, GA

 
DONATE TO ME
Default [How To] Manually Change System (And Other) Fonts

Hello all, I'll start this off with the usual...
If you break your $!#7, it ain't my fault! No one twisted your arm here.

Anyway, I've noticed a few instances in these forums where someone will have questions about changing fonts so, I thought I would reprise my old
Sense 3.0/3.5 Thunderbolt tutorial and adapt it to our RAZRs and MAXXes, for those who would like to know the ins and outs of it. This will likely work for many devices in general and, I'm fairly certain it will work for both the CDMA/xt912 and the GSM/xt910 RAZRs. I can't guarantee this though so, check for similarities on your GSM device before diving in.

Of course, it's not necessary to go the manual route but, I think it's beneficial to anyone in the sense that it can give you a slightly more intimate understanding of how things work behind the scenes, AND it will allow you to show more consistency, when changing your fonts, than you would while using an app such as Rom Toolbox or the more specialized font changing apps.


A quick warning here, before you get started:
You SHALL find yourself in a bootloop if you fail to follow instructions!!
But, this is absolutely nothing to worry about, as long as you're prepared. Create a backup in SafeStrap (or whatever recovery applies in your case) prior to moving forward, if you haven't already. Should you find yourself in the bootloop, of which you were warned, there are merely two things you need to do:

1. (And this is HUGELY important) Shut the hell up! I hear you blaming me! I promise, YOU screwed up! lol

2. All you need to do is to perform an advanced restore from SafeStrap. Simply restore the System partition and don't worry about anything else. This should take less time than a full restore, which is unnecessary here.

So, here we go...

You'll need a root-enabled file explorer to do this. Root Explorer is my old stand-by but, Rom Toolbox also has one included. Another excellent option (coincidentally, a FREE option) is ES File Explorer. Any of these will work fine here.



To begin, I'll give you an idea of what you'll see in the "System/fonts" folder, as well as, offer an explanation for the purpose of the ones I know.


  • AndroidClock.ttf = Stock Digital Clock Widget & Dock/Desk Clock ("Clock" in App Drawer).
  • AndroidClock_Highlight.ttf = Lock Screen Clock.
  • AndroidClock_Solid.ttf = Unsure of its purpose.
  • Clockopia.ttf = Former Stock clock font but, seems unused by the system in Android 4.0+.
  • DroidSans.ttf = Apparently unused in Android 4.0+. System font from previous Android versions.
  • DroidSans-Bold = Apparently unused in Android 4.0+. Bold system font from previous Android versions.
  • Roboto-Regular.ttf = This is the one always referred to as the "System Font." It yields the most noticeable results and, is the one all the font changer apps alter. Affects almost all text on your device.
  • Roboto-Bold = The bold version of Roboto. Not seen everywhere but it is seen. Opening your Gmail app to an email in your inbox will allow you to see Regular and Bold in the same occurrence. The sender's name will be in bold and their address will be in Regular. I recommend changing if you have a bold version of your replacement font.
  • Roboto-Italic = Unsure of its frequency of use but, it's not often. However, if you have a matching Italic font, it can't hurt to use it.
  • Roboto-BoldItalic = Unsure of its frequency of use but, it's not often. However, if you have a matching Bold Italic font, it can't hurt to use it.
  • There are also various other languages of the Roboto font in the "System/fonts" folder. If a particular language is your default, I'm sure it's obvious what adjustments you would need to make with regards to font replacement.

Now that you have an idea of the fonts you may want to replace, you've reached a crossroads. If you ONLY feel the need to change Roboto-Regular, then you may want to consider aborting here and using one of the apps.
If however, you want more, this may be your thing. Here's what you do next. And it doesn't have to be done this way precisely but, I've found it to be much simpler than the alternatives.

1. You'll want to open your file explorer and navigate to the root of your SD-Ext card. Here you'll create a folder. Name it something you'll remember. It will contain copies of your personal fonts that you'll be wanting to use - just the ones which correspond to the System fonts you wish to be changed. Make the copies of your fonts and place them in this folder.

2. Re-name your fonts to PRECISELY match the names of their System font counterparts. P-R-E-C-I-S-E-L-Y!
IMPORTANT NOTE: Android DOES NOT recognize fonts with the "otf" or "open type font" file extension. It ONLY recognizes fonts with the "ttf" or "Truetype Font" file extension. In my experience though, you may simply change "otf" to "ttf" while re-naming them and they'll work fine.

Just so we're clear, here's an example.




If you're replacing Roboto-Bold.ttf,
with a font named Neutraface-Bold.otf,
you don't JUST change it to "Roboto-Bold.otf". You change it to "Roboto-Bold.ttf"

3. Now that you have all your fonts re-named to match their System Font counterparts, it's time to multi-select them all and either copy or move/cut (COPY is safer).

4. Navigate to the System folder, which is ABOVE the root of your SD card in the hierarchy. Within this folder, you'll find the "fonts" folder. Make sure your file explorer is set to "R/W" or "Read/Write" rather than the "RO" or "Read Only" setting. Once you've done this, paste your fonts within the "fonts" folder. When it asks you, select the box that says something to the effect of "do this for all" then allow it to overwrite the existing files.


5. We're almost there now! Next thing to do is to change permissions (Usually a long-press option) for each of the pasted font files. Right now their permissions read something like this - "rwxr-x".
It needs to read like this - "rw-r-r".

Bringing up the permissions options will probably look like nine check boxes arranged neatly in a square or rectangular pattern. That's three rows of three boxes.


Currently it looks like this:
x= a check
o= unchecked

o o o
x x x
x o x

OWNER= No Permissions
GROUP= Read and Write and Execute
OTHERS= Read and Execute

It needs to look like this when you're done. And it needs to be done for EVERY file you pasted in this folder.

x x o
x o o
x o o

OWNER= Read and Write
GROUP= Read
OTHERS= Read

6. Reboot and enjoy your triumph over The Man!
Before you diagnose yourself with depression or low self-esteem, make sure that you are not, in fact, just surrounded by assholes.
<><><><><><><><><><><><>
Look here for Thunderbolt splash screens
Learn how to change Sense 3.0/3.5 fonts
Learn how to manually change various ICS/JB system fonts
<><><><><><><><><><><><>

Current - Moto RAZR MAXX
Previous - HTC Thunderbolt
More Previous - HTC Incredible
The Following 11 Users Say Thank You to c_live_lee For This Useful Post: [ Click to Expand ]
 
marcosed2012
Old
#2  
Account currently disabled
Thanks Meter 7
Posts: 18
Join Date: Jul 2012
great work... thanks....
The Following User Says Thank You to marcosed2012 For This Useful Post: [ Click to Expand ]
 
redheadplantguy
Old
#3  
Senior Member
Thanks Meter 29
Posts: 299
Join Date: May 2011
Location: Louisville KY
This might be exactly what I've long been searching for.
Question. I have fonts I've downloaded. Can I rename a regular typeface font to "bold" and replace roboto-bold?
Apple. For those who just can't be bothered with thinking for themselves.
 
c_live_lee
Old
#4  
c_live_lee's Avatar
Senior Member - OP
Thanks Meter 578
Posts: 2,406
Join Date: Sep 2010
Location: Augusta, GA

 
DONATE TO ME
Quote:
Originally Posted by redheadplantguy View Post
This might be exactly what I've long been searching for.
Question. I have fonts I've downloaded. Can I rename a regular typeface font to "bold" and replace roboto-bold?
That should work just fine, redhead. It isn't too picky about the fonts you actually use. It mainly cares only about whether you name them appropriately for your intended purpose. Basically, you can name your fonts in whatever combination you like, as long as you use Google's established naming convention and, you understand that whatever the font is, renaming it will do only just that. It will not change the type of font in any way. Bold will not change to italic simply because one renames it, etc. With that understanding, go for it my friend.

Sent from my XT912 using Tapatalk 2
Before you diagnose yourself with depression or low self-esteem, make sure that you are not, in fact, just surrounded by assholes.
<><><><><><><><><><><><>
Look here for Thunderbolt splash screens
Learn how to change Sense 3.0/3.5 fonts
Learn how to manually change various ICS/JB system fonts
<><><><><><><><><><><><>

Current - Moto RAZR MAXX
Previous - HTC Thunderbolt
More Previous - HTC Incredible
 
redheadplantguy
Old
#5  
Senior Member
Thanks Meter 29
Posts: 299
Join Date: May 2011
Location: Louisville KY
Quote:
Originally Posted by c_live_lee View Post
That should work just fine, redhead. It isn't too picky about the fonts you actually use. It mainly cares only about whether you name them appropriately for your intended purpose. Basically, you can name your fonts in whatever combination you like, as long as you use Google's established naming convention and, you understand that whatever the font is, renaming it will do only just that. It will not change the type of font in any way. Bold will not change to italic simply because one renames it, etc. With that understanding, go for it my friend.

Sent from my XT912 using Tapatalk 2
Hmm, tried that and went into soft brick.
Restored fine, but i REALLY want to change bold font. It doesn't match the rest of my theme.
Anything i should double check?
Apple. For those who just can't be bothered with thinking for themselves.
 
c_live_lee
Old
#6  
c_live_lee's Avatar
Senior Member - OP
Thanks Meter 578
Posts: 2,406
Join Date: Sep 2010
Location: Augusta, GA

 
DONATE TO ME
Quote:
Originally Posted by redheadplantguy View Post
Hmm, tried that and went into soft brick.
Restored fine, but i REALLY want to change bold font. It doesn't match the rest of my theme.
Anything i should double check?
Hmmm... I'm honestly not sure here. I really expected it to work fine. Have you only tried it the one time, or more than once? I would simply double check to make sure all is compliant and try it again. If it still doesn't work, I'm sorry, but I'll be at a total loss.

Sent from my XT912 using Tapatalk 2
Before you diagnose yourself with depression or low self-esteem, make sure that you are not, in fact, just surrounded by assholes.
<><><><><><><><><><><><>
Look here for Thunderbolt splash screens
Learn how to change Sense 3.0/3.5 fonts
Learn how to manually change various ICS/JB system fonts
<><><><><><><><><><><><>

Current - Moto RAZR MAXX
Previous - HTC Thunderbolt
More Previous - HTC Incredible
 
Zer0bee
Old
#7  
Junior Member
Thanks Meter 0
Posts: 2
Join Date: Dec 2012
Exclamation Bootloop

I programed your tutorial and i got bootloop. i want to know- when we got bootloop, and in my case what i am doing wrong-

os.writeBytes("chmod 777 /system/fonts/DroidSans.ttf\n");
os.writeBytes("rm -r /system/fonts/DroidSans.ttf\n");
os.writeBytes("dd if=/sdcard/AndroPolyGlot/DroidSansBackup.ttf of=/system/fonts/DroidSans.ttf\n");
os.writeBytes("chmod 644 /system/fonts/DroidSansFallback.ttf\n");
 
c_live_lee
Old
#8  
c_live_lee's Avatar
Senior Member - OP
Thanks Meter 578
Posts: 2,406
Join Date: Sep 2010
Location: Augusta, GA

 
DONATE TO ME
Quote:
Originally Posted by Zer0bee View Post
I programed your tutorial and i got bootloop. i want to know- when we got bootloop, and in my case what i am doing wrong-

os.writeBytes("chmod 777 /system/fonts/DroidSans.ttf\n");
os.writeBytes("rm -r /system/fonts/DroidSans.ttf\n");
os.writeBytes("dd if=/sdcard/AndroPolyGlot/DroidSansBackup.ttf of=/system/fonts/DroidSans.ttf\n");
os.writeBytes("chmod 644 /system/fonts/DroidSansFallback.ttf\n");
Sorry you're having issues. All that stuff at the bottom of yiyr post isnt telling me a whole lot though. Can you describe for me, step by step, how you went about the process?
Before you diagnose yourself with depression or low self-esteem, make sure that you are not, in fact, just surrounded by assholes.
<><><><><><><><><><><><>
Look here for Thunderbolt splash screens
Learn how to change Sense 3.0/3.5 fonts
Learn how to manually change various ICS/JB system fonts
<><><><><><><><><><><><>

Current - Moto RAZR MAXX
Previous - HTC Thunderbolt
More Previous - HTC Incredible
 
Zer0bee
Old
#9  
Junior Member
Thanks Meter 0
Posts: 2
Join Date: Dec 2012
Default Procedure

Quote:
Originally Posted by c_live_lee View Post
Sorry you're having issues. All that stuff at the bottom of yiyr post isnt telling me a whole lot though. Can you describe for me, step by step, how you went about the process?
Let me explain you the whole procedure. I'm just following your procedure explained above. Mounting system in Read-Write mode and then changing permission of font file in "/system/fonts", then replacing system font with my font, and adding permission to replaced font to 644.

Process process = Runtime.getRuntime().exec("su");
DataOutputStream os = new DataOutputStream(process.getOutputStream());
os.writeBytes("mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system\n");
os.writeBytes("chmod 777 /system/fonts/DroidSans.ttf\n");
os.writeBytes("rm -r /system/fonts/DroidSans.ttf\n");
os.writeBytes("dd if=/sdcard/AndroPolyGlot/"+fontToChange+" "+"of=/system/fonts/DroidSans.ttf\n");
os.writeBytes("chmod 644 /system/fonts/DroidSans.ttf\n");


here i'm replacing DroidSans.ttf, and after rebooting the device, it goes to bootloop. but if i'm following the same procedure with DroidSansFallback.ttf, devices reboot normally and that font will be supported.
Problen is only with DroidSans.ttf and DroidSans-Bold.ttf. Please help me.
 
freemod
Old
#10  
Member
Thanks Meter 3
Posts: 55
Join Date: Apr 2011
i need this font tutorial tq

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes