05-03-2016, 07:55 PM | #1 |
Member
Posts: 15
Karma: 10
Join Date: Apr 2014
Device: Kindle Fire, iPad
|
Kindle for iOS (AZK format) - line height issue
Hi there,
I am having an issue when I convert my Kindle to AZK format (for iOS) where within some paragraph there is a variation in line height from one line to the next. This happens when a paragraph contains a quote which extends at least the full length of a line. To provide more detail: 1) Quotes appear in a span tag like <span class="Quote"> within the paragraph (paragraph enclosed in a <p> tag) 2) The font size of a quote (set in the CSS) is smaller than the font size of the paragraph, and the font is bold. 3) line-height is set on the paragraph class (<p> tag) but not on the quote class (<span> tag) 4) In this example the paragraph <p> font-size is 0.95em and line-height is 1.287em; quote <span> font-size is 0.803em The Kindle Fire etc. is obeying the line-height of the paragraph regardless of span tags within the paragraph. However it appears to me that Kindle for iOS is not obeying the line-height of the <p> tag if the text in the <span> tag extends the full length of a line. Possibly it still does use the line-height set in the <p> tag (eg. 1.287em) but because all the text on the line is 0.0803em (instead of 0.95em) it recalculates the line-height based on this lower font-size value?? In other words it is like the Kindle Fire calculates line-height a paragraph at a time while Kindle for iOS calculates line-height a line at a time?? Does anyone have any ideas how to solve or workaround this issue? Many thanks in advance for your help. Heulwen |
05-04-2016, 09:01 AM | #2 |
mostly an observer
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
The default line height on the Kindle platform is 1.2, I believe. (Whatever it may be, there IS a default line height.) Therefore I think it's unwise to specify a line height at all in your style sheet.
Keep it simple and let the defaults rule! |
Advert | |
|
05-05-2016, 07:28 PM | #3 |
Member
Posts: 15
Karma: 10
Join Date: Apr 2014
Device: Kindle Fire, iPad
|
Unfortunately in this case I do need to specify line height : (
It seems to work fine on most Kindle devices, just an issue on Kindle for iOS? |
05-09-2016, 04:06 AM | #4 |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Kindle actually (spottily) enforces a hard minimum of 1.2 for the line height, and ignores any line height that is smaller.
Worse, IIRC, some Kindle devices implement that limit incorrectly on some devices, resulting in the line height being calculated incorrectly if the font's ascender and descender don't add up to the em square, causing it to increase the line height to even more than 1.2x the font size because of the incorrect font height calculation. If your line height is at least 1.2, I would suggest taking your fonts and running them through Fontographer or any other program that can automatically recompute the font metrics. (I think Adobe's font SDK might even be able to do this on its own.) See if that fixes the problem. If you are trying to specify a line height less than 1.2, you'll have to find a different way to achieve the desired effect. |
05-09-2016, 05:03 AM | #5 |
Resident Curmudgeon
Posts: 73,896
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
And then there are some fonts who's metrics can give you a smaller line height with a Kindle. So the suggestion to ignore line-height is a very good one.
|
Advert | |
|
05-09-2016, 04:55 PM | #6 |
Member
Posts: 15
Karma: 10
Join Date: Apr 2014
Device: Kindle Fire, iPad
|
Thanks guys for your help.
I suspect (I haven't tested yet) that even if I don't specify line height I am still going to have the same problem on the Kindle for ios - ie. lines within some paragraphs will have a smaller line height than other lines in the same paragraph when a span tag extends at least the full length of a line (containing a quote with a smaller font size), so the line height for that line is being calculated as less. This means I will still have varying line height across lines in a single parapgraph which is not so pretty : ) |
05-12-2016, 12:23 AM | #7 |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
|
05-12-2016, 12:24 AM | #8 | |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Quote:
|
|
Tags |
azk, ios, line height |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kindle for iOS (AZK format) - image sizing issues | heulwen.jones | Kindle Formats | 3 | 05-11-2016 07:58 PM |
Kindle for iOS (AZK format) - Layout issues | heulwen.jones | Kindle Formats | 3 | 05-03-2016 07:18 PM |
Issues sideloading AZK to Kindle for iOS | evergreen | Kindle Formats | 4 | 01-01-2016 03:10 PM |
Line-height in Kindle books | RbnJrg | Kindle Formats | 8 | 07-26-2013 03:56 PM |
Kindlegen 2.8, plain Kindle & line-height | davidnwelton | Kindle Formats | 4 | 03-25-2013 01:05 AM |