Default 'Spacing' settings are too wide for many people on its narrowest setting. Here's what I use to fix this. This process is not modifying line spacing, it's achieving the look of smaller line spacing by increasing scale of fonts files. All that's needed is uploading a modified custom font file to the device, selecting it, and it should work on all reflowable books that Amazon supports. This solution works on every book in every format that supports custom fonts. It works on store bought books, and it works on sideloaded books.
It should also work on every reader that supports custom fonts, but it's really not needed on others, because they tend to support custom reading apps that allow smaller line spacing settings, or their default readers support such settings. It's also possible to modify line spacing directly on epub books, because style commands of the "line-height:" family work on them. Kindle simply ignores this setting once epub is converted to one of it's formats. I think that 'line-height' command works on azw3 format, but then you're missing out on a few goodies that kfx format supports, like native cover thumbnails, and it's only viable for sideloaded books.
Requirements:
Spoiler:
- Windows, Linux or Mac and some knowledge on how to work with files.
- FontForge program:
https://fontforge.org/en-US/ (freeware)
- Custom font files: Use your favourite fonts. It's also possible to use default Amazon fonts, by downloading them from their site, modifying them and adding them into custom fonts folder.
- Any Kindle that supports custom fonts.
Instructions:
Spoiler:
- Open FontForge:
- File -> Open (Ctrl+O) — Open your font file
- Encoding -> Compact — This will hide empty glyphs, and speed up the process.
- Select all glyphs: Edit -> Select -> Select All (Ctrl+A) — Glyphs must be selected for adjustments to be made.
- Window -> New Metrics Window (Ctrl+K). — I use this to preview changed. Input some text into the smaller top window, and it'll show a preview. Top and bottom of fonts can overlap in preview, we want this. They should not overlap each other in width, though.
- While all Glyphs are selected: Element -> Transform:
— Origin: Glyph Origin (make sure that this dialogue is set to 'Glyph Origin')
— Scale Uniformly (100% means no change, 130% scales font by 30%. I tend to get best results at 120% scaling. With values of around 110-150% also being usable. Higher values mean smaller space between lines. At 200%, lines will certainly overlap on every font.
— transfer all layers (off)
— transform guide layers too (off)
— transform width too (on)
— transform kerning classes too (on)
— transform simple positioning ...... (on)
— round to int (off)
- Even though 'transfer width' automatically changes width of glyphs, it's occasionally still needs to be adjusted a little. Larger scale requires larger width changes. Check 'New Metrics Window' input a few all caps sentences, and a few words to see changes that were made then proceed to the next step if there are problems.
- If fonts overlap, increase width of glyphs: Metrics -> Set Width (Ctrl+Shift+L) — Do this in main FontForge window, not in New Metrics Window. Select "Increment Width by:" 20 to 50 for 130% scale is usually enough. IMPORTANT: This process can be very CPU intensive for font files with many glyphs, and can take minutes on a desktop. Just leave it open until it finishes, then you should see the changes immediately in the 'Metrics Window'. Fine tune fonts with further instances of "Set Width" if needed. Dialogue accepts minus values as well. Metrics -> Auto Width can be used to achieve similar results, I just haven't tested it thoroughly.
- After all gyphs are processed: Element -> Font info (Ctrl+Shift+F). This step names fonts. It's optional, but a good practice in organising fonts. Only change "PS Names" entries. I like to keep modified and original font on my device. I just add scale by which I increased fonts at the end of each "Footname", "Family Name", and "Name for Humans". "Fontname" doesn't accept spaces. After changes are made, you may be asked to auto change XUID, you may retain or auto generate this, it should have no effect on Kindle readers.
- Export font as a new file: File -> Generate Fonts (Ctrl+Shift+G).
— Select 'OpenType (CFF)'
— Name new font. —
— It's not unusual to get errors, just click 'Generate'
— New font will be created in the same directory as the source font.
- Repeat process for Italic and Bold fonts of same font family if needed. Italics tend to be used in books, while bolds are very rare. In case that there is no Italic font family, or there is one but is named incorrectly, Kindle will automatically slant normal fonts. For Serif fonts, this isn't ideal, but San-Serif fonts usually don't look that different, so they're often omitted. Some care needs to be taken when naming Italic and Bold fonts so they all fall under the same font family. Under 'Font info' dialogue, 'Family Name' must be the same. And when fonts are generated, it's best to have Italic and Bold font named exactly the same just with -Italic at the end of the file. -It, -Bold, -BoldIt can also be used. Just use some common sense here, and name fonts in the same way as your source fonts are.
- Copy new fonts to Kindle into Fonts directory, and test them out on a few books. Look at italic passages, how fonts fare with all caps titles, and in different layout settings.
If all goes well, you're now in possession of a Kinde reader that is capable of displaying sensible line spacing.
Drawbacks and notes:
Threads that talk about this issue and some links:
Some Before/After screenshots from my Kindle. Because fonts are scaled, font size settings differ. I tried to match some samples, but it was never possible to get them exactly the same. It should give and idea what to expect. There's also a font zip file in attachments with eight fonts, that I've scaled by value of 120 to 130%. All fonts scaled are freeware, or open source. Links to original fonts are provided in the links section.
That's it. I hope someone finds it useful. I may add a few more screenshots and fix some typos, in the meantime, have a Happy Christmas everyone.
POST HISTORY:
1.0 Initial post
1.1 Included Linux as optional requirement
1.2 More fonts, more samples. Clarified width step. I previously stated that all fonts need to have width corrected. It turns out that this is incorrect, as most don't require this step.