Quote:
Originally Posted by Tex2002ans
I agree. The span solution seems quite hackish to me. Reminds me of the ol' soft hyphen discussion, where hyphenation is best left to the devices themselves. The solution looks ok on the surface, but it would cause more pain in the long-run.
Hyphenation should be left to the hyphenation algorithm, kerning should be left to the font, and the text itself should be pure.
At least things have gotten better on this front since ~2011-2012:
|
Ideally it would be taken care of automatically. But I can't fix every font or every layout system.
I'm not going to go through a book and put spans between each pair of characters. In fact, only 5 in the entire book. This is just a small tweak that fixes a small problem.
As for "hackish"... I guess you've never looked at the code of the average commercial ebook. Or one produced by a Calibre conversion. I have spent hours cleaning up stupid code and endless nested spans that negate each other. Sometimes an ebook can be reduced by 20% or more just by simplifying the code with a bunch of S&R.
The tiny bit of code I add is functional. But how it looks on the page/screen is the only real test, and I think this looks better.
Quote:
Originally Posted by Jellby
Only if your hardcoded spacing happens to match the kerning for the particular font, and only if the renderer doesn't add the kerning to the spacing (I'm not sure if there's any spec on how HTML/CSS elements should affect kerning). And this at the cost of possibly breaking searching, cluttering the code and maybe triggering other bugs (I think ADE will consider both sides of the <span> as valid hyphenation points).
|
If the font kerning doesn't match my hard coded spacing, then by replacing it I've improved it.
It's not going to break searching, unless you are search for a pair of nested quotemarks. As I got it, the text had a singel spce between them anyway, so its no less searchable.
I hope the hyphenation isn't idiotic enough to put a hyphen between two quotemarks.
Quote:
Originally Posted by Jellby
998 of them couldn't care less, just as they don't care about straight/curly quotes, punctuation inconsistently inside/outside italics, poor justification, ligatures, etc.
But don't misunderstand me, I don't mean the HTML/CSS way is wrong, only that it's not perfect and you should consider the cons as well as the pros to make your decision. And of course, as long as your decision is different from mine, I may try to convince you 
|
Of course its not "perfect". I considered a dozen alternatives and chose the least imperfect. Doing nothing is cleaner code but worse typography.