View Single Post
Old 09-28-2012, 05:56 AM   #1
MarvinO
Member
MarvinO is generous with chocolateMarvinO is generous with chocolateMarvinO is generous with chocolateMarvinO is generous with chocolateMarvinO is generous with chocolateMarvinO is generous with chocolateMarvinO is generous with chocolateMarvinO is generous with chocolateMarvinO is generous with chocolateMarvinO is generous with chocolateMarvinO is generous with chocolate
 
Posts: 19
Karma: 33225
Join Date: Aug 2012
Device: Kindle Touch
New version of OFFICIAL fonts on K5!

This is a little howto guide to getting the new fonts without owning a K3/K4 device. Because I used this post as a step thru and then found out things on the way read it thru before following it! Some steps are not needed or only needed to verify/find out information that I already put up here!

When looking at K3 and K4 changelogs one can see this:


K4 Software Update Version 4.1.0
* Improved reading font that is higher contrast and crisper so that you can enjoy a paper-like reading experience.

K3 Software Update Version 3.4
* Improved Font: We've improved the reading font to have more contrast and be more crisp.


That got me wondering, they are most probably using a new version of the default font on it. Let's find out.

Get 3.4 update from http://s3.amazonaws.com/G7G_Firmware...e_3.4_B008.bin
Get 4.1.0 update from http://s3.amazonaws.com/G7G_Firmware...4.1.0_B00E.bin

Use kindletool to extract them, get it from http://www.mobileread.com/forums/sho...d.php?t=187880

I'm using windows so I'm going with kindletool-v1.5.1.1-mingw.zip. Extract it and put the update files inside the directory (for easy access).

Start>run>cmd for winxp or start>type cmd (newer than xp)

Go to the kindletools directory for me it is "cd C:\Users\myusername\Downloads\kindletool-v1.5.1.1-mingw"

For nice placement create K3 and/or K4 directory (you really only need one, I'm doing both to see that they contain THE SAME new font) enter "kindletool.exe extract Update_kindle_3.4_B008.bin k3" And you see information about the package and extraction of files. Look inside the k3 directory.

We are interested in update-patches.tar.gz. Open it with WinRAR, 7-zip whatever archiveing program and extract the contents.
It contains the binary patch files of:
074.Caecilia_LT_65_Medium.ttf.patch
075.Caecilia_LT_66_Medium_Italic.ttf.patch
076.Caecilia_LT_67_Cond_Medium.ttf.patch
077.Caecilia_LT_68_Cond_Medium_Italic.ttf.patch
078.Caecilia_LT_75_Bold.ttf.patch
079.Caecilia_LT_76_Bold_Italic.ttf.patch
080.Caecilia_LT_77_Cond_Bold.ttf.patch
081.Caecilia_LT_78_Cond_Bold_Italic.ttf.patch
082.KindleBlackboxBoldItalic.ttf.patch
083.KindleBlackboxBold.ttf.patch
084.KindleBlackboxItalic.ttf.patch
085.KindleBlackboxRegular.ttf.patch
086.Kindle_Symbol.ttf.patch

Next open rootfs_md5_list.tar.gz and see that the rootfs_md5_list contains (I've sorted them for easy reading):

3954651ba10e35b11fe723b64749d1f0 /usr/java/lib/fonts/Caecilia_LT_65_Medium.ttf
0b776aa698b706eb077641d097ad0a9c /usr/java/lib/fonts/Caecilia_LT_66_Medium_Italic.ttf
38e3118b285f7715e4a082ead9bdb7a8 /usr/java/lib/fonts/Caecilia_LT_67_Cond_Medium.ttf
486ea032afdf97fd5022daecf957a7e2 /usr/java/lib/fonts/Caecilia_LT_68_Cond_Medium_Italic.ttf
fa4778e2c28957ff0094299061c61ef8 /usr/java/lib/fonts/Caecilia_LT_75_Bold.ttf
5b0637b447bdb1a1648af7e41e89515d /usr/java/lib/fonts/Caecilia_LT_76_Bold_Italic.ttf
718f1ed0d34c7ef18f8b3b0e79f264f8 /usr/java/lib/fonts/Caecilia_LT_77_Cond_Bold.ttf
628198bf8826a3bb87ddb2c284d3a4bf /usr/java/lib/fonts/Caecilia_LT_78_Cond_Bold_Italic.ttf
23790fb3eae4a94a338af9b7864e4f7d /usr/java/lib/fonts/KindleBlackboxBoldItalic.ttf
5801dcd28d7ad9652defd6fa4225de13 /usr/java/lib/fonts/KindleBlackboxBold.ttf
f5200f16fb7a91cb57958fcce40bcc87 /usr/java/lib/fonts/KindleBlackboxItalic.ttf
20d560961d0e6265138c5f491de2cb82 /usr/java/lib/fonts/KindleBlackboxRegular.ttf
2ba4944b309c0b3bd2c7989d5ce2d604 /usr/java/lib/fonts/Kindle_Symbol.ttf

These are the MD5 checksums that should match after we have done binary patching.
Disregard everything else, we only need the 13 ttf.patch files


For K4 use the same extract command. kindletool.exe extract Update_kindle_4.1.0_B00E.bin k4 Now this is a newer version of patching so look inside K4 directory and there is mnt\us directory, there you'll find Update_payload.bin Move it to kindletool

directory. Make a new directory for example k4_ext and extract it: kindletool.exe extract Update_payload.bin k4_ext. Now inside that k4_ext directory you'll find the

same as in K3 update-patches.tar.gz. Extract it.
Here the filenames are:
049.Caecilia_LT_65_Medium.ttf.patch
050.Caecilia_LT_66_Medium_Italic.ttf.patch
051.Caecilia_LT_67_Cond_Medium.ttf.patch
052.Caecilia_LT_68_Cond_Medium_Italic.ttf.patch
053.Caecilia_LT_75_Bold.ttf.patch
054.Caecilia_LT_76_Bold_Italic.ttf.patch
055.Caecilia_LT_77_Cond_Bold.ttf.patch
056.Caecilia_LT_78_Cond_Bold_Italic.ttf.patch
057.KindleBlackboxBoldItalic.ttf.patch
058.KindleBlackboxBold.ttf.patch
059.KindleBlackboxItalic.ttf.patch
060.KindleBlackboxRegular.ttf.patch

K4 does not update Kindle_Symbol.ttf file as K3 does, there is no binary diff file for it. K4 has rootfs_md5_list.tar.gz but that is empty. So no MD5 hashes to check against there They are in fact "hidden" inside 1331440003-1615370055.ffs file. It's a mess to look at in Notepad (unix vs windows linebrake). But the hashes are as follows:
_PATCH_MD5=`md5sum "patch/usr/java/lib/fonts/Caecilia_LT_65_Medium.ttf" | awk '{ print $1; }'`

_EXPECTED_MD5=3954651ba10e35b11fe723b64749d1f0

I won't write them here, but the MD5 hashes ALL MATCH against those that are in more readable form in K3! So this is first great success! K3 and K4 use the same new version of the font!


### THIS IS FOR INFORMATION PURPOSE ONLY, IF YOU WANT TO UPDATE K5 FONTS DIRECTLY, SKIP THIS ###

Now we have the files, next we need the original K3 or K4 fonts. The easiest way to get them is from the full restore archives. Look here http://www.mobileread.com/forums/sho...d.php?t=170929 under "Kindle "Debricking Repair" Images"

You'll need the first partition and that is named mmcblk0p1. I'll go with K4 mmcblk0p1-k4-4.0.1.7z because that is only 82.5MB and the mirror seems up (github ones are all down).
Extract it to the directory you have the patch files. Now there is a problem, it is EXT3 linux file system and I (and you in this guide ) need to open it. The easiest way to do that is to use http://www.chrysocome.net/explore2fs tool. I use 1.08beta9. download, extract and run it. In File>Open Image File... point it to mmcblk0p1.img. Now use the tree in left to go to:
/usr/java/libs/fonts direcotry. Select all the Caecilia font files and Kindle blackbox files, right click, export files. Coose the directory where you have the binary patch files.

And this is where I found out that K4 4.0.1 contains the same version of fonts that K5 5.1.2


I use http://support.microsoft.com/kb/841290 FCIV utility from microsoft, but you can use ANY MD5 checksumming tool.

THESE MATCH BETWEEN K4 and K5!
c02cc2bab69488643fdcc5934d182b9b k5\Caecilia_LT_65_Medium.ttf
be8b8670d90fb35a95e9b14c19b29e54 k5\Caecilia_LT_66_Medium_Italic.ttf
5c178ca3538d301a71c34de8db84af92 k5\Caecilia_LT_67_Cond_Medium.ttf
4bf41675e2c9ab76dd9f67f0acf0aa91 k5\Caecilia_LT_68_Cond_Medium_Italic.ttf
105cbd5249051c2b121addfcdd4f2b24 k5\Caecilia_LT_75_Bold.ttf
d62ff8d708895faddffffa22abba2891 k5\Caecilia_LT_76_Bold_Italic.ttf
fa152a298398045808892038fb703275 k5\Caecilia_LT_77_Cond_Bold.ttf
e2c07f4c165e2e6a2807b761d930afa0 k5\Caecilia_LT_78_Cond_Bold_Italic.ttf

These don't
5801dcd28d7ad9652defd6fa4225de13 k5\KindleBlackboxBold.ttf
23790fb3eae4a94a338af9b7864e4f7d k5\KindleBlackboxBoldItalic.ttf
f5200f16fb7a91cb57958fcce40bcc87 k5\KindleBlackboxItalic.ttf
20d560961d0e6265138c5f491de2cb82 k5\KindleBlackboxRegular.ttf
8f14367401e5e17ab7df5282a952b520 k5\Kindle_Symbol.ttf


Now remember those MD5 hashes before?
23790fb3eae4a94a338af9b7864e4f7d /usr/java/lib/fonts/KindleBlackboxBoldItalic.ttf
5801dcd28d7ad9652defd6fa4225de13 /usr/java/lib/fonts/KindleBlackboxBold.ttf
f5200f16fb7a91cb57958fcce40bcc87 /usr/java/lib/fonts/KindleBlackboxItalic.ttf
20d560961d0e6265138c5f491de2cb82 /usr/java/lib/fonts/KindleBlackboxRegular.ttf

They are already at the same version that is in K5 5.1.2!

This does not match, but it is not used in reading books anyway
2ba4944b309c0b3bd2c7989d5ce2d604 /usr/java/lib/fonts/Kindle_Symbol.ttf

### CONTINUE HERE ###

Now that we know that the only files that have been changed in K4 newest version compared to K5 newest are the Caecilia fonts we only use those patches.

049.Caecilia_LT_65_Medium.ttf.patch
050.Caecilia_LT_66_Medium_Italic.ttf.patch
051.Caecilia_LT_67_Cond_Medium.ttf.patch
052.Caecilia_LT_68_Cond_Medium_Italic.ttf.patch
053.Caecilia_LT_75_Bold.ttf.patch
054.Caecilia_LT_76_Bold_Italic.ttf.patch
055.Caecilia_LT_77_Cond_Bold.ttf.patch
056.Caecilia_LT_78_Cond_Bold_Italic.ttf.patch

If you already have the fonts from K4 image then no need to get them from your Touch. But if you skipped the middle part as I told you need the font files from your Touch. The easiest way is to use http://www.mobileread.com/forums/sho...&postcount=293 on your jailbroken device. It takes quite a long time to dump the main filesystem but you'll end up with mmcblk0p1.img.gz file in your Kindle root directory. Extract it to your working direcotry. Now there is a problem, it is EXT3 linux file system and I (and you in this guide ) need to open it. The easiest way to do that is to use http://www.chrysocome.net/explore2fs tool. I use 1.08beta9. download, extract and run it. In File>Open Image File... point it to mmcblk0p1.img. Now use the tree in left to go to:
/usr/java/libs/fonts direcotry. Select all the Caecilia font files, right click, export files. Coose the directory where you have the binary patch files.

Next we need bsdiff program for applying the binary patches. Get it here http://www.pokorra.de/coding/bsdiff.html
Extract bspatch.exe and use it for every Caecilia file as follows:

bspatch.exe Caecilia_LT_65_Medium.ttf Caecilia_LT_65_Medium_new.ttf 049.Caecilia_LT_65_Medium.ttf.patch

Or better, use the same filename and you'll patch them in place!

Now when you open Caecilia_LT_65_Medium_new.ttf you can see that it is at version 5.40, open the original and it is at version 5.00 beta.
Repeat for all Caecilia files.


You'll end up with all the patched files. Now let's verify them:

3954651ba10e35b11fe723b64749d1f0 k5new\Caecilia_LT_65_Medium_new.ttf
0b776aa698b706eb077641d097ad0a9c k5new\Caecilia_LT_66_Medium_Italic_new.ttf
38e3118b285f7715e4a082ead9bdb7a8 k5new\Caecilia_LT_67_Cond_Medium_new.ttf
486ea032afdf97fd5022daecf957a7e2 k5new\Caecilia_LT_68_Cond_Medium_Italic_new.ttf
fa4778e2c28957ff0094299061c61ef8 k5new\Caecilia_LT_75_Bold_new.ttf
5b0637b447bdb1a1648af7e41e89515d k5new\Caecilia_LT_76_Bold_Italic_new.ttf
718f1ed0d34c7ef18f8b3b0e79f264f8 k5new\Caecilia_LT_77_Cond_Bold_new.ttf
628198bf8826a3bb87ddb2c284d3a4bf k5new\Caecilia_LT_78_Cond_Bold_Italic_new.ttf
And these all match MD5 checksums in K3/K4 update file.


Now hot to use them?
Rename them to remove the _new if you used that bspatch command.

Place the 8 files on your Kindle root to /fonts directory. Now unplug your Touch and in the search field write ";fc-cache" without the "" and return on the virtual keyboard. It seems to do nothing but in about 3 minutes or so the screen will go blank and then when everything reappears the new fonts are in use (look here http://www.mobileread.com/forums/sho...&postcount=738).

And there you go! New fonts on K5.

Credits:
http://www.mobileread.com/forums/sho...&postcount=235
http://www.mobileread.com/forums/sho...&postcount=734

Last edited by MarvinO; 10-05-2012 at 09:18 AM. Reason: Add credit, fix formatting
MarvinO is offline   Reply With Quote