09-10-2016, 05:10 AM | #16 |
Resident Curmudgeon
Posts: 76,465
Karma: 136564696
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
09-10-2016, 06:17 PM | #17 |
Read, don't parrot.
Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
|
Tex,
I do know how to embed a font, but I wrongly thought the symbol was only available in Webdings (which the author used), and Webdings is copyrighted. The problem with font embedding is 1) not all ereaders support font embedding; 2) if the user turns off publisher formatting, the symbol will disappear; 3) if the ereader does not read CSS, the symbol will disappear. On the other hand, if the reader does not read CSS, the image will become HUGE because the em value is in the CSS. (I wonder if I should do both: put the em value in the CSS and in the HTML?) What a dog's breakfast. This is why I suggested she not use the image. It's not integral to the book. I am curious, though, as to why you included SSs of Kindle. Kindle reads the Unicode without the need to embed the font. (I am naming my firstborn after Doitsu for that.) Thanks, Tex, for taking the time to create a test book, screenshots, and the code for embedding a font. Much appreciated. |
09-10-2016, 06:54 PM | #18 | ||
Read, don't parrot.
Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
|
Okay, just tried a test whereupon I put the 1em value in BOTH the CSS and the HTML -- and voila! The symbol image appears and scales as intended whether or not the user turns publisher formatting on or off.
HTML: Quote:
Quote:
|
||
09-10-2016, 07:27 PM | #19 | |
Read, don't parrot.
Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
|
Quote:
In the interest of not sidetracking this thread, I started a new thread on the above issue. When you come up for air it's here: https://www.mobileread.com/forums/sho...82#post3389482 Thanks. |
|
09-10-2016, 08:46 PM | #20 | ||||
Wizard
Posts: 2,304
Karma: 12587727
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Quote:
Many of us try to settle on solutions that work across formats, instead of having to annoyingly create format- and vendor-specific EPUBs (one set of code for Apple, one set of code for ADE, one set for Nook, one set for Amazon, [...]). Quote:
http://www.alanwood.net/demos/wingdings.html Side Note: I forget if Toxaris's EPUB Tools handles the conversion of Webdings -> UTF-8? I know that Toxaris implemented the Symbol font -> UTF-8 after we came across some Greek/Math shenanigans. Quote:
Personally? I have settled on using the UTF-8 characters + Font Embedding. If the device doesn't handle UTF-8 reasonably AND can't handle fonts? Too bad, that is on them. Side Note #1: Similar to your music notes, I run into this situation all the time with Polytonic Greek characters. Many fonts/devices don't have some of the more obscure accented Greek characters. That won't stop me from actually using the actual UTF-8 characters. All of the Pros of actual characters heavily outweighs the Pros of a bitmap (in my mind). Would you rather read this? [...] cannot therefore conceive that social institutions could have arisen in any way except through the intervention of a ‘world shaper’ of the Platonic or this? [...] cannot therefore conceive that social institutions could have arisen in any way except through the intervention of a ‘world shaper’ of the Platonic δημιουργὸς. I don't believe I can upscale that image in ems on MobileRead, but you can imagine how crappy that would look compared to the pure text. The problem with bitmaps only gets worse the higher DPI becomes as well. (This was an example of Greek Images used in one of the latest books I fixed.) Side Note #2: Back in 2014, we also had a nice discussion about Image/SVG/HTML Tables: https://www.mobileread.com/forums/sho...69#post2850269 Almost all of the same exact arguments apply here (as you can probably guess, I am in the HTML Tables camp). :P You can also see example images where I changed the background to black + red font. Last edited by Tex2002ans; 09-10-2016 at 08:48 PM. |
||||
09-11-2016, 01:51 AM | #21 | |
Read, don't parrot.
Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
|
Quote:
I, too, wish it were possible to create an ePub that works across all platforms, but that has become a fantasy ever since device manufacturers began using image coding as their new DRM. And since Kindle is a format all its own I don't worry about making the ePub work with Kindle. I also use Kindlegen to make my mobi files from ePubs, but I modify a copy of the ePub to make it Kindle-specific before conversion. Thanks for the link to the Unicode Webding equivalents. Will bookmark that for later reference. I am also in the HTML table camp. I believe the more you can do in HTML, the better. But in this case, the symbol worked well when I put the em value in both the CSS and the HTML -- no matter the ePub reader, whether it reads CSS or not, this works (at least in the few options I have to test; the author is testing on her boyfriend's Mac). And it's only the one symbol. Your Greek issue is a whole other can of worms. Yikes. |
|
09-11-2016, 05:43 AM | #22 | |
Wizard
Posts: 2,304
Karma: 12587727
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
It includes a few more test cases:
Night Mode So, I open up my book. White background black text, who could read any other way? My book looks PERFECT! It is getting a little late and the white is starting to blind me. Let me flick on Night Mode: Oh crap, where did those musical notes go? Well let me go to the non-transparent version: Woof, I can't even tell what those notes are. Now let me just swap over to the Embedded Font: Beautiful! Colors, Colors, and More Colors Now, forgive me ahead of time for these abominations, but I wanted to show how it would look if a reader picked a Green background + Red text: I love to read in Red text, but those stupid musical notes are ruining my perfect look! As you can see, the Transparent/Non-Transparent Images have some serious mismatches. One of the things you have to keep in mind when you create these ebooks is that people will be reading on all different types of settings, and you should make sure your book does great in most/all of these situations. Night Mode and Color are two of the most used settings (on non-e-ink devices). One symbol? One symbol? The entire fate of the world is in the balance here! The same issues still apply (Text-to-Speech problems, Search problems, Font Color problems, [...]), only different in scale. Last edited by Tex2002ans; 09-11-2016 at 06:01 AM. |
|
09-12-2016, 03:49 PM | #23 | |
Read, don't parrot.
Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
|
Tex,
In the iBooks Asset Guide, it states that, for fixed layout books, one must specify an embedded font: Quote:
|
|
10-25-2016, 01:56 AM | #24 |
Read, don't parrot.
Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
|
Back when I started this thread, I used a Unicode character in the Kindle book in order to solve the problem of the musical symbol in the Kindle version of the book (as per Doitsu's suggestion).
Today I was going through the Kindle Publishing Guidelines again and Amazon write: "Do NOT use Unicode format characters, as they may cause problems." This, even though they also write: "The source of a Kindle book can be encoded in many different ways. All encodings are supported, provided that: The encoding of the HTML files is clearly stated in the HTML [and ] The computer used for compiling the sources supports the encoding and knows how to convert it to Unicode." So if the encoding is Unicode, and when tested the Kindle devices and apps display Unicode characters, why would Amazon "forbid" Unicode characters? What am I missing? |
10-25-2016, 02:53 AM | #25 | |
Grand Sorcerer
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
|
|
10-25-2016, 03:15 AM | #26 | |||
Wizard
Posts: 2,304
Karma: 12587727
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Quote:
U+0020 SPACE U+00A0 NO-BREAK SPACE U+1680 OGHAM SPACE MARK U+180E MONGOLIAN VOWEL SEPARATOR U+2000 EN QUAD U+2001 EM QUAD U+2002 EN SPACE U+2003 EM SPACE U+2004 THREE-PER-EM SPACE U+2005 FOUR-PER-EM SPACE U+2006 SIX-PER-EM SPACE U+2007 FIGURE SPACE U+2008 PUNCTUATION SPACE U+2009 THIN SPACE U+200A HAIR SPACE U+200B ZERO WIDTH SPACE U+202F NARROW NO-BREAK SPACE U+205F MEDIUM MATHEMATICAL SPACE U+3000 IDEOGRAPHIC SPACE U+FEFF ZERO WIDTH NO-BREAK SPACE Just stick with the two mentioned above (Non-Breaking Space + Zero-Width Non-Joiner) and you will be fine. Side Note: Besides those two, the only other space that is commonly used would be the Thin Space, and that is used in languages like French (around punctuation marks like guillemets « » + colons, etc. etc.). To be more compatible, you can swap Thin Spaces <-> Non-Breaking Spaces (not as typographically pleasing though)... although I don't believe I have seen any problems with thin spaces on Kindles. Quote:
From what I could tell by looking at previous guidelines (2014.3), there used to be two separate subsections:
Somewhere along the line, they merged both and added in the line: "XML entities are strictly required for "<" (<), ">" (>), and "&" (&).". Their previous version seemed to make a lot more sense in my mind. Merging them together just created some needless confusion. Just use the Unicode characters, and avoid using all those rarer spaces. Problem solved. :P Last edited by Tex2002ans; 10-25-2016 at 03:27 AM. |
|||
10-25-2016, 07:26 AM | #27 |
mostly an observer
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
I can use the Unicode thin space?
Will an epub containing the thin space cause any problems outside the Kindle universe? |
10-25-2016, 03:01 PM | #28 | |
Read, don't parrot.
Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
|
Quote:
Another point to this issue: Amazon still promote the idea that Kindle books can only read Latin-1 (ISO-8859-1) characters. Yet after I learned here about using Unicode to create the musical symbol, I began experimenting more. I randomly chose 10 Unicode characters and tested them in both Previewer and my Kindle Fire device. In Previewer all the characters display correctly except for the older Kindle DX, which could only display 3 of the 10 characters. My Fire displays all fine. So why would Amazon not want to promote the use of Unicode, seeing as it solves a number of issues? If they promote KF8 formatting, which the DX also cannot read, why not promote Unicode too? Last question (she says): when exporting to HTML from Word, should we now select UTF-8 encoding or leave it as the default Windows-1252, before importing into Sigil? And does it make a difference if PC or Mac? I ask because on the KDP website is written: "If you are experiencing conversion failures when trying to upload HTML content, please open the HTML file in Notepad and save it with "Encoding: ANSI" (this is an option in the 'Save As' Notepad dialog). On non-Windows platforms, make sure to save it as ANSI or ASCII, avoiding 'UTF-8' or 'Unicode' as the encoding type." I'm wondering if that is restricted to Mac and/or restricted to the auto-conversion from HTML to mobi, or if it affects Sigil ePub-to-mobi conversions. When I look at my early Sigil ebooks, built from a Word-to-HTML file, the charset is Windows-1252 but the encoding is of course UTF-8. (I have never experienced an issue in my ebooks but wondering if I just got lucky.) It also doesn't makes sense to me to tell users to avoid UTF-8, especially as in the Publishing Guidelines (Section 6.6) Amazon give as an example UTF-8 coding. So is the above issue a Mac or Linux (or other non-Windows platform) thing? |
|
10-25-2016, 05:58 PM | #29 |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
I think Amazon continues to worry about fall-back solutions for older products, which is why they discourage UTF-8.
Dale |
10-25-2016, 07:57 PM | #30 | ||
Wizard
Posts: 2,304
Karma: 12587727
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
As DaleDe mentioned, they most likely say to avoid those rarer spaces to be FULLY compatible with older Kindles/firmwares. I am not too sure of all of the fonts Kindles have/had available since the Kindle 1 + firmware 1.0. Again, the more compatible substitution would be   -> . For example, in French: Code:
<p>This is an example of a French quote : « Il est très beau ! »</p> Code:
<p>This is an example of a French quote : « Il est très beau ! »</p> Quote:
I don't recall ever seeing anything about that in the Amazon Kindle Publishing Guidelines: https://kindlegen.s3.amazonaws.com/A...Guidelines.pdf MAYBE that was just a troubleshooting step if you were doing some horrible Word -> Kindle conversion. Who knows what madness some WYSIWIG editor like Word might introduce. I have seen some really scary files, and I just shudder to think what kind of horrors Amazon has seen. Side Note: I bet as Amazon/Kindles expanded internationally they made sure to expand the characters included in their default fonts (via firmware updates). I mean, it would be preposterous selling Russian ebooks without Cyrillic characters. To be a valid EPUB, HTML files must be UTF-8 or UTF-16. Calibre/Sigil already makes files UTF-8 on import. Last edited by Tex2002ans; 10-25-2016 at 08:21 PM. |
||
Tags |
em value, image scaling, inline image |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
TOC problem - AZW3 and MOBI do not show inline H2 | hrvojej | Conversion | 2 | 06-06-2016 04:29 PM |
Glo Image problem | Andrew Ashling | Kobo Reader | 18 | 12-12-2012 03:24 PM |
Adding a scaleable inline image within a paragraph | ryntau | ePub | 4 | 02-03-2012 12:20 PM |
Creating epub with inline block problem | Gerlyn | ePub | 5 | 12-22-2011 02:59 PM |
HTML to EPUB Inline Text/Image Issue | HoushaSen | Conversion | 2 | 07-02-2011 09:03 PM |