06-29-2014, 06:07 PM | #211 |
doofus
Posts: 2,520
Karma: 13036221
Join Date: Sep 2010
Device: Kobo Libra 2, Kindle Voyage
|
|
06-29-2014, 09:32 PM | #212 |
BLAM!
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@Barty: Tweak the metrics to kill (some/all) the vertical padding. I'm pretty sure someone posted more detailed instructions (when using Fontforge as the font editor) at one point .
It's been a while since I've done it myself, so here are a few jumble of keywords for you: metrics, ascent, descent |
Advert | |
|
07-04-2014, 01:18 PM | #213 | |
doofus
Posts: 2,520
Karma: 13036221
Join Date: Sep 2010
Device: Kobo Libra 2, Kindle Voyage
|
Quote:
|
|
07-04-2014, 02:28 PM | #214 |
BLAM!
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@Barty: I *vaguely* remember that there's a couple of places were those things are set (for compatibility reasons), and only one of those place is the one we actually care about.
Since I've only ever used Fontforge, I can't really say what FontCreator does. |
07-04-2014, 05:31 PM | #215 |
Resident Curmudgeon
Posts: 73,966
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I'll have a look at my CharisSIL and see if I can figure out what exactly I did to fix things. But the values will be different for different fonts. It's a trial and error process until you get it working to your liking. You will have to keep testing on the Kindle until it's the way you like. No other way to test it.
|
Advert | |
|
07-06-2014, 04:11 AM | #216 |
Connoisseur
Posts: 71
Karma: 200092
Join Date: Mar 2014
Device: kindle pw1
|
Here some of my experiences with font's metrics and line-height:
Values for line-height computation are stored in different places within the font, mainly -- WINAscent and WINDescent pair -- hhea Ascender, hhea Descender and Line-Gap trio -- Typo Ascender, Typo Descender and Typo Line-Gap trio Afaik the Kindle (only ?) uses the hhea values but ignores the Line-Gap. So for all practical purposes: - check the EM Unit Size of your font (should be 1000 or 2048 - all other values are relative to the unit size) - compare WINAscent/WINDescent with hhea Ascender/hhea Descender (should be identical in most cases but the hhea Descender must be a negative value) - if your font has a Line-Gap>0 you may add the Line-Gap to the hhea Ascender and set the Line-Gap to zero Font's metrics vary considerably - for example Times New Roman has a Caps-Height of 1341, Caecila of 1434 (both with 2048 EM Unit Size), so Caecilia is quite a bit larger than Times New Roman even with the same point size. Concerning line-height some fonts (like Georgia or Droid) have "tight lines" (for example Georgia 2 with Asc=1878 and Desc=-449, which gives a line-height of 2327), other have "loose lines" (for example Caecilia with Asc=2183 and Desc=-559, which gives a line-height of 2742). To get some kind of comparison for the line-heights it may be feasible to compute the line-height/caps-height ratio: Georgia 2 has 1.64 / Caecila has 1.91. If you want to edit the metrics of your font to look at the Kindle fonts may be a good starting point. Caecilia's Asc/Desc I've already mentioned, for Baskerville the values are 1907/-588. Finally come caveats: I tried to fine-tune the line-height for some font lately and found there must be additional information (besides hhea values) used by the kindle as I lost a complete line on the page by reducing the asc by only 1 (some kind of threshold perhaps). Some fonts use the Y-Max/Y-Min for all glyphs as hhea values which may result in "large" line-heights (Charis with its extensive glyph set is an example for this). Some fonts may be converted from/to TTF/OTF etc and the values may be screwed up. But besides the Line-Gap thing I always would give the original font's metric a chance. All this has been tested on PW1 with FW 5.3.9. |
07-06-2014, 08:25 AM | #217 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Nice summary.
Maybe the author will add a link to your post in the top-most post of this thread. |
07-06-2014, 01:49 PM | #218 |
BLAM!
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Yup, pretty nice!
I also dug up Crimson on my end, so, here comes a couple of screenshots to illustrate mandy314's post. On the left if the original font, on the right is the tweaked one. (I didn't touch the General Ascent/Descent, nor the Em Size). Basically, killing the line gap and matching the metrics' ascent/descent to the general ones usually works pretty well for me. (If you're wondering why my Fontforge doesn't look like crap, it's because I'm using a recent snapshot build ;p). ---- EDIT: Linked these two posts in the Notes section of the first post. Last edited by NiLuJe; 07-16-2014 at 12:32 PM. |
07-06-2014, 07:03 PM | #219 |
doofus
Posts: 2,520
Karma: 13036221
Join Date: Sep 2010
Device: Kobo Libra 2, Kindle Voyage
|
Thanks a bunch, mandy314 and NiLuJe!
|
07-06-2014, 10:45 PM | #220 |
Member
Posts: 24
Karma: 10
Join Date: May 2011
Location: Worcester, MA USA
Device: kindle PW2, PW3 & KV; Kobo Glo HD
|
I have been trying for hours to install several of these hacks on my Paperwhite 1 running 5.4.4.2 and keep running into the same problem - sort of. I successfully installed Duokan 2014 today and now nothing shows in update in kindle settings. Everytime I restart the kindle up pops Duokan and in chinese, I can't get it to display in english even though I chose english. I can't uninstall Duokan so it prevents me from installing anything else. I thought I jailbroke the kindle at one point but must have lost it when the PW updated last time without me knowing. Any help?
scott EDIT sorry for the multiple posts in possible wrong threads - hope this is a good one |
07-06-2014, 11:45 PM | #221 |
BLAM!
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@wn1ytw: Duokan is evil and known to do weird things interfering with how we install stuff.
(You should be able to uninstall it though, but I really can't help you with that ). |
07-08-2014, 06:02 AM | #222 |
Member
Posts: 24
Karma: 10
Join Date: May 2011
Location: Worcester, MA USA
Device: kindle PW2, PW3 & KV; Kobo Glo HD
|
I found the answer in an FAQ- it works and @NiLuJe: yes it is evil!
How do I un-install? Delete the folders starting DK and reboot the Kindle. |
07-16-2014, 10:38 AM | #223 |
Connoisseur
Posts: 71
Karma: 200092
Join Date: Mar 2014
Device: kindle pw1
|
@knc1 and NiLuJe
thank you for your kind words @Barty glad it worked for you Now I've done a small table of Kindle's/NOOK's and some free serif fonts which may be helpful in "adapting" font's line-heights for use on the Kindle. Let me explain the columns: 1 - Font: as found on device or as distributed (for private use the NOOK fonts can be extracted from software update files I think) 2 - EM Unit Size: in all cases 2048 but could be 1000, all other values are relative to the unit size 3 - x-Height: height of the x glyph (baseline to top) 4 - x/EMUS: ratio of x-height to unit size (0.45 means the x-glyph's height uses 45% of EM) 5 - caps-Height: height of (latin) caps glyphs (baseline to top) 6 - c/EMUS: ratio of caps-height to unit size (0.69 means the latin caps glyph's height uses 69% of EM) 7 - x/caps: ratio of x-height to caps-height (0.65 means x glyph has a height of 65% relative to caps-height) 8 - x-AdvanceWidth: Advance Width of x-glyph (incl side bearings) 9 - x/h: ratio of x-AW to x-height (1.20 means x glyph has an advance width of 120% realtive to x-height) 10 - Asc: hhea Ascender (height from baseline to top of font bounding box) 11 - Desc: hhea Descender (height from baseline downto bottom of font bounding box - always negative) 12 - LG: additional Line-Gap 13 - sum: Line-Height=Asc-Desc+LG 14 - LH/caps: ratio of Line-Height to caps-height (1.77 means Line-Height is 177% relative to caps-height) (all values are for regular font, except Caecilia Medium which is used as Regular by Kindle) I'm sure you will know what to do with all this information but here some thoughts anyway - Baskerville may have not been the best choice for the Kindle as it has a relative small x/h (Column 9) ratio; or: Baskerville is a wide font - Caecilia Cond isn't a designed font, the Kindle software does the "condensing", I think Caecilia Cond could have a x/h ratio (Column 9) of around 1 - the NOOK fonts listed work for me "out of the box" for the Kindle except I like a little more Line-Height for Georgia and a little less for Ysobel; in case of Ysobel I use the hhea values of Caecialia and have a good readable page - the free fonts are all nice but need some "heavy" tuning to work on the Kindle I think; Charis has a very large line-height (the Compact version adresses this issue); Droid has very tight lines and Liberation (aka Chrome Tinos / same metrics as Times New Roman) is relatively small. For me the main problem with the free fonts is their stroke width being "too" fine for use on an ereader device. I do not need the fonts as "fat" as Caecilia, I am happy with the listed versions of Palatino, Ysobel and Georgia (as designed afaik with etext applications in mind). And this is me being 50+. So - as I said in my earlier post - give the original metric of the fonts a chance. |
07-16-2014, 10:43 AM | #224 |
Resident Curmudgeon
Posts: 73,966
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
If you look at Mandy's chart in the previous message and look specifically at Charis SIL and Charis SIL Compact, check out the numbers that are different. Those are the numbers that need to be tweaked to change the line height on a Kindle.
The numbers that need to be tweaked for ADE are different and because of this, one font can be tweaked for both ADE and KF8. The numbers for ADE with Charis SIL were already good to go from the start. It's just the numbers for KF8 that needed tweaking. |
07-23-2014, 03:32 AM | #225 |
Groupie
Posts: 150
Karma: 48
Join Date: Apr 2014
Device: Kindle Paperwhite 2, Kobo Aura HD
|
I have a PW2, and would replace Baskerville with Constantia (a somewhat bolder version of the original). I think i understood what to do, (theoretically) can I cause bigger hiccups with that setup (without doing anything else)? I wouldn't like to factory reset, and i would like to make changes which may ruin the Aa menu, but not the system itself.
(The question in short, should i also dig into which scripts to run in case of trouble, or I can do the above without running SSH. I have some desktop Linux experience, but I have not used it so frequently in the last couple of years.) |
Tags |
fontconfig, fonts, freetype, hacks, paperwhite, touch |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
K5 FW 5.x ScreenSavers Hack | NiLuJe | Kindle Developer's Corner | 3002 | 04-04-2024 09:30 AM |
[Kindle Touch] Font Hack | ixtab | Kindle Developer's Corner | 508 | 05-18-2020 12:41 PM |
Hacks Kindle Touch Registration Hack | codeisnightmare | Amazon Kindle | 15 | 10-19-2014 09:17 PM |
Touch Can I get Kindle Touch Fonts On Nook Touch? | tanteoma | Barnes & Noble NOOK | 5 | 05-17-2012 09:02 PM |
Font Hack for Kindle Touch? | Sassapphras | Kindle Developer's Corner | 1 | 02-12-2012 09:05 PM |