Kindle Optimizer‎ > ‎

Font Rendering - Technical Details

Look closely at the blowup image. How many gray shades to you see? Amazon and E-Ink claim their display is capable of 16 gray levels, and indeed, if you look at a gray step wedge, you get 16 shades. However the fonts are only rendered in four shades.

Clearly visible are: White, Black, light gray and dark gray. This was also verified by calculating a pixel histogram of the binary screen data. If Amazon fully utilized the 16 gray shades available, it might improve the font display.

If you look at the binary image data from a screen capture, the pixels in this font display are gray level 255 (white), 170 (lt. gray), 85 (dark gray), and 0 (black). When viewed on a normal (backlit) monitor, you would get approximately this ratio of brightnesses. Modern monitors show very bright "whites" and dark "blacks". But with the E-Ink display, the picture is different, so to speak

Even optimizing the contrast of the image, stretching it so that the background is quite bright and the black pixels are dark, I measure: 214, 160, 125 and 71 as the respective gray levels for measurements made over small areas in this image. So, while the actual data show that light gray is twice as bright as dark gray, in the image, light gray is only about 33% brighter, and both are a middle gray. Even "black" is relatively light, only 1/3 as bright as "white". Note that these measurements were not made fully quantitatively, with proper controls, so these numbers should not be taken as gospel. However, they do prove a point, that the contrast on the display is much lower than that of the actual pixel data.

If I were implementing the font rendering algorithm, I would do two things. First, I would use all 16 gray shades. That would allow much greater subtlty in the rendered fonts. Next, I would run the font gray shades through a gamma look-up table to render the fonts in a manner so that the actual display on the E-Ink properly matches the contrasts in the digital data. This is called, unsurprisingly, gamma correction, and it is a critical part in calibrating a display.
Gamma changes the relative gray values in an image. For example, it is typical to increase the contrast between the middle gray shades while compressing the contrast of the lightest and darkest pixels. This increases the contrast of the characters while maintaining some of the font smoothing for a pleasing looking font. In the above image, that would allow rendering the dark gray pixels as much darker, close to black, and the light gray pixels as lighter, closer to white. This combination results in a higher contrast character rendering, again without actually altering the font.

Another advantage to gamma correcting the font rendering is tha tthis will improve the look of Topaz book. These are books that contain their own font data. Even with new Amazon fonts, these books may still appear too low contrast if the publishers choose fonts that are not designed for the Kindle.

To test this, I took a digital snapshot (using shift-alt-G) of actual Kindle 2 screens rendered with the native Caecilia font. These were imported into Photoshop and gamma adjusted then saved as an uncompressed GIF file. I also had Photoshop render the same text in its "strong" setting. This comparison image is available below so that you can load and view it on your own Kindle for comparison.
 
I learned several items of interest:
  1. Photoshop renders its fonts in 16 gray shades
  2. When Photoshop renders the Caecilia font normally, it is 'whispier' than how the Kindle renders it.
  3. When Photoshop renders the Caecilia font in 'strong' mode, it looks beautiful when transferred to the Kindle.
  4. Gamma correcting the raw Kindle font data, with only four gray shades improves its appearance slightly.
  5. When the Kindle renders an image, it draws it twice, effectively doing the same thing as pressing 'Alt-G'. When it renders a font, it only does so once.

Ultimately, the most important upgrade will be providing a font rendered more like the "strong" rendering mode of Photoshop.


Keep in mind that viewing the comparison image (below) on a computer screen is meaningless. That's the purpose of these exercises! A font that looks great on the computer screen looks quite different on a Kindle because of the very different display technologies.
 
 
Č
ą
Ted Inoue,
Apr 15, 2009, 11:54 AM
Comments