Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,805,892 Members 43,077 Now Online
XDA Developers Android and Mobile Development Forum

[MOD/Tutorial] Lockscreen clock fonts and how-to

Tip us?
 
itiskonrad
Old
(Last edited by itiskonrad; 3rd August 2012 at 07:09 PM.)
#1  
Senior Member - OP
Thanks Meter 224
Posts: 272
Join Date: Dec 2009
Default [MOD/Tutorial] Lockscreen clock fonts and how-to

*This is only for the stock, non-deodexed Gingerbread rom for the Nitro. If you want to apply this mod to a particular rom, let me know and I can apply it to it.*


**TYPICAL DISCLAIMER: I am not a dev, just a guy messing with this phone and sharing my experiences, so try anything I suggest at your own risk and protect yourself with lots of backups! And if you have any questions at ALL, please ask before trying something that could hurt your very expensive phone! =) **

For those of you obsessed with the minor cosmetics of android (or for those of you who just can't get enough of ICS), you may have noticed that changing the lockscreen font to whatever you want is much harder than in other usual android roms. Ordinarily, all you have to do is find a font you like (*.ttf format), rename it to Clockopia.ttf and plop it into /system/fonts in your phone, and voila, lockscreen clock changed. Unfortunately, LG modified the rom so that it doesn't use Clockopia.ttf for the lockscreen font at all. It just uses whatever system-wide font is being utilized at the time, making it impossible to have, for example, an Ice Cream Sandwich style font setup, with roboto font for the phone and the ICS lockscreen font for the clock (which is actually quite different looking from roboto). Well, I, for one, couldn't stand for that, so I found the settings in framework.odex, deodexed it, changed the settings to use Clockopia.ttf for the lockscreen and re-odexed it back. Now, trying out different fonts is as simple as swapping in a new *.ttf. For example:

Default clockopia font (included in attached zip)


Ice Cream Sandwich lockscreen font (included in attached zip)


Gothic font I imported (included in attached zip)


Here's what you'll need to apply this mod:

1.) 7zip for your computer
2.) root explorer (with root access) for your phone

Here's what to do:

1.) BACK UP EVERYTHING FIRST! With clockworkmod and titanium and anything else you use! Any time you mess with system files, always backup everything first! In particular, back up "framework.odex" and "framework-res.apk" from your phone's /system/framework/ folder somewhere safe so that you can revert back to the original versions if you like.

2.) From attached "framework.zip" file, copy the framework.odex file to /system/ folder of your phone using root explorer.

3.) Using root explorer, change permissions of framework.odex to Owner: read write, Group: read, Others: read.

4.) Now that it has correct permissions, move framework.odex into /system/framework of your phone, letting it overwrite your original odex

5.) Restart your phone.

If everything went as expected, your lockscreen will now show the standard clockopia font shown in the first image above. (If you are using the pattern lockscreen, the clock will be slightly cut off at the top. To fix this we will move on to step 6)

6.) Pick which ONE "fixed clock" xml you want from the attached files. If you just want to fix the clock being cut off, choose "fixed clock - stock." However, if you want to also remove (or had already removed) the emergency call button or the carrier on the lockscreen as well, pick those files instead.

7.) Copy framework-res.apk from /system/framework to your computer

8.) Right click framework-res.apk on your computer, choose 7zip, "open archive", and navigate to res/layout folder with all the XMLs in it

9.) Drag and drop the keyguard_screen_unlock_portrait.xml in the "fixed clock" zip you chose into the open archive of framework-res.apk, and let it overwrite the original xml in res/layout

10.) Move framework-res.apk back onto your phone. Using root explorer, move it to /system/, change permissions to Owner: read write, Group: read, Others: read.

11.) Now that it has correct permissions, move framework-res.apk back into /system/framework and let it overwrite the original framework-res.apk.

12.) Restart your phone!

13.) Pick whichever of the attached Clockopia fonts (including ICS) (or pick one from your computer or off the web), move it into /system/, change permissions of the font file to Owner: read write, Group: read, Others: read, and then move it into /system/fonts, overwriting the original Clockopia.ttf. (You may have to restart your phone after changing fonts for it to adjust to the new font properly).

Now if you want to change the lockscreen clock font, just swap Clockopia.ttf in /system/fonts to whatever you want (making sure to always use proper permissions). Always paste system files INCLUDING FONTS into /system/, then change permissions to Owner: read write, Group: read, Others: read, and THEN move into their proper places, overwriting the originals. NEVER try to change permissions after replacing. It probably won't end well =)

*NOTE: if you want to import fonts from windows or online or where ever, note that simply renaming the *.ttf to Clockopia.ttf and putting it into /system/fonts will result in weird spacing issues, as it does on any typical android device when swapping Clockopias. The original Clockopia.ttf font file has unique spacing for android. For importing other fonts, I suggest using wonderful font-editing freeware programs like Type Light to modify your original Clockopia.ttf by copying and pasting individual glyphs from whatever font you want over those in the original Clockopia.ttf from your phone, and then saving this as your new Clockopia.ttf. This will preserve the proper spacing, though you may still have to tweak it some, just depending on the font you're trying to import. The good news is Clockopia only has characters 0-9, :, A, M, and P, so copying and pasting these 14 characters from another font into Clockopia.ttf doesn't take too long =)
The Following 4 Users Say Thank You to itiskonrad For This Useful Post: [ Click to Expand ]
 
chungviet811
Old
#2  
Junior Member
Thanks Meter 2
Posts: 19
Join Date: Jan 2012
Location: D:/Fonts
Thanks 4 sharing,
About changing clockscreen clock font, why dont u use Fontchanger for this? will be easier
 
itiskonrad
Old
#3  
Senior Member - OP
Thanks Meter 224
Posts: 272
Join Date: Dec 2009
Font changers won't allow you to change the lock screen font without also changing the font of your phone system wide due to the way lg modified the os. This allows you to detach the lockscreen font from the rest of the phone like it normally is on stock Android os.
 
kernelpan1c
Old
#4  
kernelpan1c's Avatar
Retired Ep1c Sysadmin
Thanks Meter 315
Posts: 1,101
Join Date: Jan 2010
Location: California
Quote:
Font changers won't allow you to change the lock screen font without also changing the font of your phone system wide due to the way lg modified the os. This allows you to detach the lockscreen font from the rest of the phone like it normally is on stock Android os.
Nice work!

Sent from my LG Nitro HD
 
itasoulas
Old
(Last edited by itasoulas; 27th April 2012 at 12:03 AM.)
#5  
itasoulas's Avatar
Recognized Themer
Thanks Meter 4,472
Posts: 2,096
Join Date: Nov 2011
Location: Athens

 
DONATE TO ME
can someone speficy on the following lines what to do in order to hide carrier label from lockscreen? thanks

<TextView android:textAppearance="?textAppearanceMedium"
android:ellipsize="marquee" android:gravity="bottom|right|center"
android:id="@id/carrier" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_marginLeft="8.0dip"
android:layout_marginTop="6.0dip" android:layout_marginRight="8.0dip"
android:singleLine="true" android:layout_toRightOf="@id/time"
android:layout_alignParentTop="true" android:layout_alignParentRight="true" />
Nexus 5 / Nexus 7 (2013) USER / Follow me on Google Plus
 
itiskonrad
Old
#6  
Senior Member - OP
Thanks Meter 224
Posts: 272
Join Date: Dec 2009
Quote:
Originally Posted by itasoulas View Post
can someone speficy on the following lines what to do in order to hide carrier label from lockscreen? thanks

<TextView android:textAppearance="?textAppearanceMedium"
android:ellipsize="marquee" android:gravity="bottom|right|center"
android:id="@id/carrier" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_marginLeft="8.0dip"
android:layout_marginTop="6.0dip" android:layout_marginRight="8.0dip"
android:singleLine="true" android:layout_toRightOf="@id/time"
android:layout_alignParentTop="true" android:layout_alignParentRight="true" />
Easiest way I can think of, I would just switch

layout_height="wrap_content"

to

layout_height="0.0dip"


You might also try changing layout_width to "0.0dip", but I think swapping layout_height would have less likelihood of messing with spacing of other stuff
The Following User Says Thank You to itiskonrad For This Useful Post: [ Click to Expand ]
 
itasoulas
Old
#7  
itasoulas's Avatar
Recognized Themer
Thanks Meter 4,472
Posts: 2,096
Join Date: Nov 2011
Location: Athens

 
DONATE TO ME
Quote:
Originally Posted by itiskonrad View Post
Easiest way I can think of, I would just switch

layout_height="wrap_content"

to

layout_height="0.0dip"


You might also try changing layout_width to "0.0dip", but I think swapping layout_height would have less likelihood of messing with spacing of other stuff
it didn't work, maybe some more xmls need to be changed, thanks anyways dude!
Nexus 5 / Nexus 7 (2013) USER / Follow me on Google Plus
 
itiskonrad
Old
#8  
Senior Member - OP
Thanks Meter 224
Posts: 272
Join Date: Dec 2009
That sucks. Make sure you're looking at the right xml for what you want to change. That's all I changed to get rid of the carrier in my lockscreen, but then I changed that setting in the keyguard_screen_unlock_portrait xml, and it gets rid of the carrier in the pattern lockscreen. The non-pattern lockscreen obviously uses a different xml, so that setting will have to be changed there.
 
GalaxyS3III94
Old
(Last edited by GalaxyS3III94; 7th September 2012 at 01:30 PM.)
#9  
Member
Thanks Meter 0
Posts: 48
Join Date: Sep 2012
will work on galaxy s3 gt I9300 ?
I wanna try clockopia

thanks
 
itiskonrad
Old
#10  
Senior Member - OP
Thanks Meter 224
Posts: 272
Join Date: Dec 2009
I'm quite positive it will NOT work on anything but the stock gingerbread Nitro.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Learn How to Make a Live Wallpaper all by Yourself

Stillimages can bebeautiful, but some of you prefer to see animations on your screens. … more

Google Play Services Updated to Version 6.1

In addition to Android operating system proper, Google is focusing hard on giving the developers … more

CyanogenMod 11 M10 Available for Supported Devices

Summer vacation isover for most students out there, and it’s the time to get back to … more

XDA Forums Added for the First Batch of Android One Devices!

Just yesterday, we talked about the highly anticipated launch of the first batch … more