02-04-2013, 03:50 AM | #1 |
Writer and Blogger!
Posts: 20
Karma: 480352
Join Date: Jan 2013
Location: Halifax, NS
Device: Computer
|
letter spacing errors
Hey,
I'm getting weird spaces between my letters. Some of the headers the words are stretched away from each other, as if the space bar was hit a random amount of times after each word... I'm getting spacing errors in some of the text too, but there doesn't seem to be any indication in the HTML as to why this is happening. Looks fine in the web browser... Also noticing that the spacing errors are different between kindle previewer and kindle for pc... can someone help me? I'm working on my book...spending a lot of time getting spelling errors, and things of that nature out, I don't want it to be poorly formatted, lol... I prefer the hard coding in HTML way to converting an rtf... |
02-04-2013, 09:50 AM | #2 |
Grand Sorcerer
Posts: 27,976
Karma: 198535232
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
You mention letter-spacing and then you indicate that in headers... it's the words that are spread out. Is it letter-spacing, word-spacing, or both? If it's word-spacing, that's probably the justification algorithm at work. Nothing to be done about it (although centering your headers should stop any justification attempts on the longer ones). I've never come across any of the letter-spacing situations you're suggesting using kindlegen/Kindle Previewer to convert. Perhaps a sample of the source html and a screen-shot of what you're seeing after the MOBI is built will shed some light on what's going on.
|
Advert | |
|
02-04-2013, 02:38 PM | #3 |
Writer and Blogger!
Posts: 20
Karma: 480352
Join Date: Jan 2013
Location: Halifax, NS
Device: Computer
|
http://postimage.org/image/ahulmi3mx/
There's an image showing the spaces between the letters. Some places in the book are worse than others... Here's a sample of the code, including my CSS section. Code:
<html> <head> <title> Illusion </title> <style type="text/css"> hr {page-break-after:always;} p { text-indent : 20px; } p {margin: 0; } </style> </head> <body> <br> <a name="Dedication"></a> <h1>Dedication</h1> <p>I'd like to dedicate this book to my friends and family, as well as all the people who follow my blog and site. Thanks for the support guys.</p> <hr> <b>Table Of Contents</b> <li><a href="#Dedication">Dedication</a></li><br /> <li><a href="#Chapter1">Chapter 1: Dr. Reinstein</a><br /> <li><a href="#Chapter2">Chapter 2: The Nightmare</a><br /> <li><a href="#Chapter3">Chapter 3: Home Sweet Home</a><br /> <li><a href="#Chapter4">Chapter 4: Illusion</a><br /> <li><a href="#TheEnd">The End</a><br /> <hr> <a name="Chapter1"></a> <b>Chapter 1: Dr. Reinstein</b> <p>The rain beat down on Jake's car as he maneuvered his way around what he presumed to be a dead animal on the road. It was most likely a raccoon, or possibly even a cat, as such an occurrence wasn't out of the ordinary on that particular stretch of highway. There was always one kind of a creature or another emerging from the woods late at night to catch an untimely end on the asphalt. Fate certainly wasn't on that creatures side as he was most definitely flattened, as Jake could see his innards smeared across the road. Storms at night weren't particularly the best time for foraging for food in that area, and most animals found out the hard way.</p> |
02-04-2013, 03:12 PM | #4 |
Grand Sorcerer
Posts: 27,976
Karma: 198535232
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Yep. That appears to be the justification algorithm. The extra spacing is between words, to make each line go from margin to margin, not between individual letters like I thought you meant. You can try specifying "text-align: left;" in your css, but I don't remember if that will survive conversion or not. I find it best not to specify and let the reading software "do what it does" so that users who've found ways to customize their reading experience can easily "do what they do."
|
02-04-2013, 04:26 PM | #5 |
Writer and Blogger!
Posts: 20
Karma: 480352
Join Date: Jan 2013
Location: Halifax, NS
Device: Computer
|
"so that users who've found ways to customize their reading experience can easily "do what they do."
that sounds great, but is it a good idea to release a book with spacing in its words like that right off the bat? I would hate for people to have an issue with the formatting... I noticed it does look different when I try viewing in different apps. Like Kindle Previewer to Kindle for PC is different output... Should I just leave it as it is and hope the readers can format the text themselves within their reader? I've notice that Kindle for PC doesn't offer any options for changing fonts or anything of that nature, at least not that I've found. Thanks for the help |
Advert | |
|
02-04-2013, 05:21 PM | #6 | ||
Grand Sorcerer
Posts: 27,976
Karma: 198535232
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Quote:
|
||
02-04-2013, 05:30 PM | #7 |
Resident Curmudgeon
Posts: 76,063
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
There is absolutely nothing wrong in the screen shot shown. if you want to avoid that spacing between words, you would have to jailbreak the Kindle and turn on hyphenation for Mobi format. There is no hyphenation for KF8. Not even jailbroken.
|
02-04-2013, 06:00 PM | #8 |
Grand Sorcerer
Posts: 27,976
Karma: 198535232
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
While I might be tempted to argue with your "absolutely nothing wrong" on a semantic level ... we're basically in agreement.
|
02-04-2013, 06:42 PM | #9 |
Writer and Blogger!
Posts: 20
Karma: 480352
Join Date: Jan 2013
Location: Halifax, NS
Device: Computer
|
okay I understand what you guys are saying. It's got nothing to do with code, but rather how the code is interpreted when it's compiled....so these are normal things then?
I'll just go with defaults, so that users can change everything they like. Thanks for the help guys |
02-04-2013, 08:11 PM | #10 | |
Resident Curmudgeon
Posts: 76,063
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
02-05-2013, 02:40 PM | #11 |
Writer and Blogger!
Posts: 20
Karma: 480352
Join Date: Jan 2013
Location: Halifax, NS
Device: Computer
|
I'm not sure if that was a question, or not...lol..
I find Kindle for PC is very limited in functionality. I can't find a way to change font, letter spacing, or anything, lol. |
02-05-2013, 04:24 PM | #12 |
Resident Curmudgeon
Posts: 76,063
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
02-06-2013, 01:18 AM | #13 | |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Quote:
Try adding: Code:
p { text-align: justify; hyphens: auto; -webkit-hyphens: auto; -moz-hyphens: auto; } You can, of course, narrow the scope of the declaration a bit or override this in a more specific style if you have certain paragraphs that you explicitly don't want to auto-hyphenate, e.g. Code:
p.ragged { text-align: left; hyphens: manual; /* or none */ -webkit-hyphens: manual; -moz-hyphens: manual; } Last edited by dgatwood; 02-06-2013 at 01:23 AM. |
|
02-06-2013, 05:48 AM | #14 |
Grand Sorcerer
Posts: 27,976
Karma: 198535232
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Kindle devices do not support auto-hyphenation (even with KF8). Furthermore the hyphen css selectors are not among the list of supported selectors in the latest Kindle Publishing Guidelines.
EDIT: I believe the iPhone Kindle app (maybe others?) support auto-hyphenation, but even then... to my knowledge, it's not controlable with in-book css selectors. Kindle devices don't do auto-hyphenation at all (mobi or kf8). Last edited by DiapDealer; 02-06-2013 at 08:24 AM. |
02-07-2013, 01:35 AM | #15 | |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Quote:
Worst case scenario, you can insert soft hyphens (& shy;). IIRC, Kindlegen strips them out on the way to Mobi7, and if you combine them with hyphens: manual; and appropriate -webkit- and -epub- variants, the reader should break if necessary at that point even if the Fire uses an older version of GTK WebKit that doesn't have true auto-hyphenation support. Incidentally, WebKit itself doesn't support the hyphens selector, last I checked. It supports only the -webkit-hyphens vendor-prefixed variant. So even if/when unaided auto-hyphenation works on a Kindle, you'll probably never see that vendor-prefixed property in Amazon's officially supported property list.... Last I checked, Kindle for iOS didn't even support KF8 except fixed-layout, so I doubt it supports hyphenation usefully. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Flightcrew says Errors, but Sigil says no Errors… | Barcelona | Sigil | 4 | 02-09-2012 07:13 AM |
The Dutch letter 'IJ'. | mbovenka | Library Management | 9 | 12-29-2011 03:21 AM |
'letter-spacing' in Mobi | hkdorama | Kindle Formats | 4 | 07-26-2010 06:35 AM |
Letter to McMillan | gshoe | News | 34 | 02-08-2010 08:44 PM |