Quantcast
Channel: MobileRead Forums - Kindle Developer's Corner
Viewing all articles
Browse latest Browse all 4414

K5 Kindle Touch/PaperWhite 5.3.x Fonts Hack

$
0
0
Hi :).

You'll find here the K5 (Touch/PaperWhite) port of the Fonts hack ;).
I say 'port', but some of it's *cough* 'inspired' *cough* from ixtab's excellent Kindle Touch Font Hack, some of it from the FontConfig KUAL extension, and most of it is based on the findings of multiple people on this forum, so, thanks everyone!

Latest Updates (08/04/2013):

Fonts v0.1.N (First release!).

IMPORTANT NOTE REGARDING UPDATES:
Spoiler:

Here are general update instructions for this hacks:
  • First of all, in most cases, there's no need to touch the jailbreak again. You already installed it the first time you installed hacks. Just forget about it now ;).
  • Next, no need to run the update_*_uninstall.bin updates, ever.
  • Then, you can apply the latest update_*_install.bin updates, one by one. You can safely chain both hacks installs.



INSTALL:

Fonts:
Spoiler:



First of all, make sure your device is JailBroken.

If you intend to use the Font Overrides KUAL menu:

You will need the Python package. Make sure it's installed *before* the Fonts hack.

Download the attached kindle-linkfonts-0.1.N.zip file, and unpack it. In here, you'll find a couple of .bin files, and a couple of directories (src & build).

First, upload the update_linkfonts_0.1.N_install.bin file to the root directory of your Kindle.

Now, eject your Kindle, and go to [HOME] -> [MENU] > Settings -> [MENU] > Update Your Kindle. It should take a couple dozen of seconds.
NOTE: Since I'm not sure if this hack will work on earlier firmwares than 5.3.1, the installer will refuse to launch if you're using an older firmware.

And that's it for the installation ;). Now for a quick look at what you can do with it... All of the settings/tweaks I'll talk about are found in the Fonts KUAL menu that the hack installs, so, if you're not already using KUAL, now would be a good time to correct that ;)

The basics: adding new font choices to the aA menu. It's as simple as dropping your font files (no need to rename the files) in the fonts folder (create it if needed) at the root of your Kindle. If you already played with the USE_ALT_FONTS tweak, you should be familiar with this ;). Once you're done adding new fonts, run the Fonts -> Fonts Hack Behavior > Update fontconfig cache KUAL button to let the Kindle know about them. Once the framework has restarted, you should now see your new fonts in the aA menu! (I'd still recommend doing a full, proper restart once you're done mucking around, just to lower the chances of something wonky happening).

If you're familiar with the USE_ALT_FONTS tweak, you're also aware that it makes the full range of CJK fonts visible in the aA menu. To remove them (all) from the aA menu, run the Fonts -> Fonts Hack Behavior -> Hide CJK Fonts KUAL button, and then restart the framework (via the 'Restart framework now' KUAL button) or your device.

Like my K2/3/4 Fonts hack, you will also have a choice of three different FreeType libraries to choose from in the Fonts -> FreeType Override KUAL menu. Freetype's job is to render the fonts, so enabling this can have a drastic impact on the 'look' of your fonts. It can also help avoid a lot of weird issues with custom fonts. I'm personally usually running the BCI override. To give you a rough idea of the differences between the three choices: BCI should be the closest to Amazon's, it uses the native bytecode to hint TrueType fonts; AutoHint instead relies on freetype's own code to automatically hint fonts (it can help with fonts with broken bytecode, or at least bytecode that freetype chokes on); and light is basically autohint with a twist, might be a little closer to BCI.
(I'll refer you to the freetype & fontconfig documentation if you want more info about all this). You'll need to restart your device to take an FT override into account.

And finally, you'll also be able to override the default fonts for the four basic families (serif, sans, mono, condensed). This is handled via the Font Overrides KUAL menu. Each basic family has a submenu for Amazon fonts, and Custom fonts. Those submenus are blank by default. This is why there is Font Overrides -> Rebuild this menu button :). Running this will take a good couple of seconds, so, once you see the 'Finished rebuilding menu' message at the bottom of your screen, go back to the Font Overrides menu (if it's still blank -- which can happen if you have a heavy KUAL extensions folder and/or a lot of custom fonts --, hit the Font Overrides -> ** Refresh ** button). It should now be pretty self-explanatory: clicking a font in a family submenu will set this font as the default for this family! Run the Fonts -> Restart framework now KUAL button to take these changes into account.
Keep in mind that this KUAL menu can be pretty large, so if you feel it's slowing down KUAL cache refreshes too much, feel free to blacklist it (extension name linkfonts-ovr) via the KUAL_search_exclude_paths setting in KUAL's config ;).

Also, for those a bit more familiar with fontconfig, you're welcome to take a look at the examples in linkfonts/etc/conf.avail, a few of those can be pretty useful (more fine-grained control, making some fonts bigger, ...) :).



NOTES & TROUBLESHOOTING:
Spoiler:

Don't try to force a custom update by rebooting your Kindle. You should always install custom hacks via the Settings page. If the 'Update Your Kindle' link is greyed out, your firmware is too old, you did something wrong, or you have an unknown Kindle model (in which case, contact me!). Don't try to force an install by rebooting. It'll, at best, fail.

Another thing: every time I mention rebooting or restarting your device, you need to do it with the device completely *unplugged*. It may sound strange, but it affects a number of things in weird and interesting ways ;).



ChangeLog:
Spoiler:
  • ScreenSavers:
    • v0.1.N:
      • First release :).
  • Doc: $Id: FT_MR_THREAD 9653 2013-08-04 16:59:08Z NiLuJe $

Attached Files
File Type: zip kindle-linkfonts-0.1.N.zip (2.46 MB)

Viewing all articles
Browse latest Browse all 4414

Trending Articles