Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 07-25-2010, 02:59 PM   #1
Hrant
Polymath in training
Hrant began at the beginning.
 
Posts: 32
Karma: 10
Join Date: Jul 2010
Location: Los Angeles
Device: Kindle2 (Global)
Custom Font Hacking

Hello all.
I was referred to this forum from Kindleboards, and just joined.

I [finally] bought a Kindle (2) and am looking to leverage its
unique potential by deploying -and perhaps even developing-
hacks, particularly in the area of type and typography.

I happen to be a typeface designer, and would very much
like to use my own fonts on Kindle. Additionally, I've been
involved in optimizing screen text* since the 80s and Kindle
offers a unique arena in this respect. My grand plan is to
develop custom fonts for Kindle that [further] elevate its
text rendering quality; this is achievable because Kindle**
has a fixed resolution (per font size) and a fixed number of
gray-levels, things that no font [yet] takes advantage of.

* Example: http://www.themicrofoundry.com/manademo/

** Of course the same applies to [some] other readers.

In addition I have a background in programming - although
I admit having become a bit rusty there... So what I need
help* with is learning how to create a Kindle font hack file,
or at the very least working with people who know how to.
I suspect this is a closely-guarded black art, but I do have
my long experience with [screen] type to offer here, so I'm
open to any scheme to deliver real results on the ground.

* I don't want to leech - any help I get
will be rewarded one way or another.

Hopefully,
Hrant
Hrant is offline   Reply With Quote
Old 07-25-2010, 05:42 PM   #2
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 5,130
Karma: 4999999
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2
Welcome .

Basically, you don't have to meddle with the 'hacking' part of things anymore, it's pretty easy to switch fonts via USB. (Cf. http://www.mobileread.com/forums/showthread.php?t=88004 for the gory details).

The Kindle UI uses two fonts:

* a Serif (by default Caecilia, a semi-serif slab font): Used to render text in the books (and the bold style is also used for the book titles & authors in the Home screens)

* a Sans/Sans Serif (by default the horrible Helvetica): For most part of the UI. (Almost *every* part of the UI uses the bold style).

* There's also a Mono typeface, but I don't think it's used anywhere except in the Browser.

* AFAIK, there's also a special symbol font used for menu underline & cursors.

The Kindle runs on Linux, so all this (TrueType fonts) is rendered using the greyscale FreeType renderer. (Without the truetype bytecode interpreter). I'm not sure about the hinting level used though. If I get around to it sometime, I may try to tweak the freetype lib used to check that, provided the java framework doesn't explicitly configure that later.

If you need any more info, ask away

Last edited by NiLuJe; 07-25-2010 at 05:46 PM.
NiLuJe is online now   Reply With Quote
Old 07-25-2010, 08:16 PM   #3
Hrant
Polymath in training
Hrant began at the beginning.
 
Posts: 32
Karma: 10
Join Date: Jul 2010
Location: Los Angeles
Device: Kindle2 (Global)
Thanks for the prompt and full reply!

> you don't have to meddle with the 'hacking' part of things anymore

Wow. I had flagged that long post of yours to peruse later - I didn't realize you had made things so elegant! Many kudos to you.

I'll have to see exactly how FreeType renders TT outlines; I'll throw some of my existing stuff at it, and hopefully figure out how to design specifically for Kindle. Stay tuned, and wish me luck!

hhp
Hrant is offline   Reply With Quote
Old 07-25-2010, 09:10 PM   #4
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 5,130
Karma: 4999999
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2
If you don't want to bother with a full FreeType+Fontconfig setup to fine-tune the settings (to make sure you're using the greyscale renderer & FT autohinter for example), the utils bundled with FreeType are pretty useful.

I'm not familiar with FT on Windows/OS X, but it should basically work the same way. Also, FontForge uses FT, even on Windows/OS X (AFAICT).
NiLuJe is online now   Reply With Quote
Old 07-26-2010, 05:51 PM   #5
Hrant
Polymath in training
Hrant began at the beginning.
 
Posts: 32
Karma: 10
Join Date: Jul 2010
Location: Los Angeles
Device: Kindle2 (Global)
For anybody who's curious, a thread I started
on Typophile (the premier typographic forum):
http://typophile.com/node/72610

hhp
Hrant is offline   Reply With Quote
Old 07-26-2010, 06:46 PM   #6
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 5,130
Karma: 4999999
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2
When I said greyscale rendering, that implied greyscale *anti aliasing* too .

So, obviously no SPR (ie. ClearType) on the Kindle (FT can do SPR, but it's not enabled by defaut, again because of patents. And the 5-way FIR filter applied to smooth color fringes is entirely configurable. But SPR wouldn't make sense on a e-Ink display in our case anyway).

As for hinting, there's three different hinting levels. The actual difference they do to the output is pretty easily seen with the utils bundled with FT. But like I said, not sure exactly what level is used on the Kindle.

Regarding TrueType instructions, I'm pretty sure the Kindle doesn't use them (FT can, via the bytecode interpreter, but since it was still covered by patents, it wasn't enabled by default 'til very recently).

Long story short: FT is very powerful, and, very, very configurable . But in the Kindle case, we more or less know what the settings used are, so that helps .

EDIT: Take a look at that screenshot (with the FT util ftdiff). I'm pretty sure what's used on the Kindle is more or less the settings of the 3rd or 2nd column in my example, since I'm pretty sure it doesn't use FT's native bytecode interpreter. The text in the browser (Chromium) is rendered by FT, with full hinting, the auto-hinter, and RGB SPR with the 5-way FIR filter using the gibson coefficient as weight. (Which is a pretty heavily customized setup compared to most default Linux distro... ^^)
Attached Thumbnails
Click image for larger version

Name:	ftdiff_ex.png
Views:	241
Size:	418.4 KB
ID:	55767  

Last edited by NiLuJe; 07-26-2010 at 07:47 PM.
NiLuJe is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't change font or font size in ereaders jmacg Sigil 30 10-23-2010 10:21 PM
Replacing Kindle Font with Any Desired Font? SunLight Kindle Developer's Corner 4 10-05-2010 12:14 AM
ttc font file can't be put into font folder droople Sigil 2 08-21-2010 11:05 AM
Custom Font Question Blossom Astak EZReader 4 03-13-2010 12:04 AM
feed to lrf, how do I change font (or have default font) lovemov Calibre 3 03-16-2009 11:57 PM


All times are GMT -4. The time now is 10:49 AM.


MobileRead.com is a privately owned, operated and funded community.