Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 09-08-2016, 09:48 PM   #1
eggheadbooks1
Read, don't parrot.
eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.
 
Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
Problem with inline image

I want to put a webding symbol in my text. I have converted it to a GIF (~300 pixels x 300 pixels). I embedded the image in the text as per the following code:

Code:
When you see this symbol in the chapter <img alt="note symbol" height="1em" src="../Images/note2.gif"/>, listen to the song that accompanies the story.</p>
This code works perfectly in the ePub. But when I convert to Kindle, the symbol does not appear. I then upped the em value to 20em, and then the image appeared BUT it is a different size in Kindle Previewer than it is in Kindle for PC app, and different again in my Fire. And when I change the font size, the image does not scale as is expected in any device/app.

All help appreciated.
eggheadbooks1 is offline   Reply With Quote
Advert
Old 09-09-2016, 12:43 AM   #2
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 5,916
Karma: 55190324
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, and NookColor. 2 Droid, 1 Win8 ePUB rdrs
Quote:
Originally Posted by eggheadbooks1 View Post
I want to put a webding symbol in my text. I have converted it to a GIF (~300 pixels x 300 pixels). I embedded the image in the text as per the following code:

Code:
When you see this symbol in the chapter <img alt="note symbol" height="1em" src="../Images/note2.gif"/>, listen to the song that accompanies the story.</p>
This code works perfectly in the ePub. But when I convert to Kindle, the symbol does not appear. I then upped the em value to 20em, and then the image appeared BUT it is a different size in Kindle Previewer than it is in Kindle for PC app, and different again in my Fire. And when I change the font size, the image does not scale as is expected in any device/app.

All help appreciated.
Questions, if I may?
  1. How are you converting the file? CL KG, KP? ePUB to either? Zipped HTML to...?
  2. You're using inline CSS? As opposed to the usual? May I inquire why?
  3. Are you using the default font? I note that you've made the image 1em, in a line that by default is 1.2em, yes? Are you using any embedded font?
  4. What's the styling of the line? The line/paragraph, rather, that the image is in?

When you say that the image is a different size, in the K4PC versus the Previewer, wouldn't you expect that? Assuming that you don't have K4PC sized the same as the KP viewing/reading pane?

What happens if you use other image types? PNG? JPG?

Hitch
Hitch is offline   Reply With Quote
Old 09-09-2016, 04:24 AM   #3
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 1,182
Karma: 13060990
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
I know that since you are making books for commercial resale, it is highly unlikely, but just in case you are using Calibre to convert to AZW3 --- if you want to preserve font-size settings from your original code, on the "Look and Feel" dialog for your conversion settings, make sure to disable "font re-scaling". This definitely affects font-sizing --- not sure if it would affect images sized in ems, but logic says possibly so.
GrannyGrump is offline   Reply With Quote
Old 09-09-2016, 06:01 AM   #4
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 3,957
Karma: 12058512
Join Date: Dec 2010
Device: Kindle PW2
@eggheadbooks1: Kindles and Kindle apps support the following Unicode characters that you could use instead of a Webdings symbol:

&#x2669; Unicode Character 'QUARTER NOTE' (U+2669)
&#x266a; Unicode Character 'EIGHTH NOTE' (U+266A)
&#x266b; Unicode Character 'BEAMED EIGHTH NOTES' (U+266B)
&#x266c; Unicode Character 'BEAMED SIXTEENTH NOTES' (U+266C)
Doitsu is offline   Reply With Quote
Old 09-09-2016, 01:14 PM   #5
eggheadbooks1
Read, don't parrot.
eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.
 
Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
Thanks to everyone for responding.

I am converting the ePub to Kindle using Kindle Previewer (Kindlegen).

Sorry, when I pasted the code I must have missed the opening tag:

Code:
<p class="NoIndent">When you see this symbol in the chapter <img alt="note symbol" height="20em" src="../Images/note2.gif"/>, listen to the song that accompanies the story.</p>
I thought that was the usual code -- I have it from an older Kindle Publishing Guidelines (coding for inline images has disappeared from the latest guide).

Default font. No font family information in the CSS as per Amazon's demands. Body text is 1em.

In the past, I have created scaling images by using an em value; the image scaled with the font. However, these were not inline images but logos on the title page that I put in a frame. I cannot frame this musical symbol because it has to appear inline as if it were text.

Doitsu: I will try the unicode symbol as that may be the easiest and most logical. However, I would still like to learn how to do this in case I have to do it again for another book. I don't do this commercially, only for myself and friends.

As for working in ePubs, I spoke too soon. It works great in ADE and in Aldiko but not in my older Kobo Touch (which I was finally able to test once it recharged). :-(
eggheadbooks1 is offline   Reply With Quote
Advert
Old 09-09-2016, 01:31 PM   #6
eggheadbooks1
Read, don't parrot.
eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.
 
Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
Quote:
Originally Posted by Doitsu View Post
@eggheadbooks1: Kindles and Kindle apps support the following Unicode characters that you could use instead of a Webdings symbol:

&#x266b; Unicode Character 'BEAMED EIGHTH NOTES' (U+266B)
Doitsu: This is the exact symbol and the unicode works! In Kindle. But not in ePubs. Sigh.

Thus far, then, I can use the unicode for Kindle, and the image for ADE and the likes of Aldiko, but not for Kobo.

Well, one down and only one to go. All continued help appreciated.

Last edited by pdurrant; 10-28-2016 at 06:22 AM. Reason: fixed quote tags
eggheadbooks1 is offline   Reply With Quote
Old 09-09-2016, 01:40 PM   #7
eggheadbooks1
Read, don't parrot.
eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.
 
Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
Also, Hitch, I will try using CSS instead of inline styling. That may work better. Will report back.
eggheadbooks1 is offline   Reply With Quote
Old 09-09-2016, 01:51 PM   #8
eggheadbooks1
Read, don't parrot.
eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.
 
Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
We have lift off!

Hitch: set the image height in CSS instead of inline and now the image appears in my older Kobo.
Doitsu: Kindle problem solved using Unicode.

Many thanks.
eggheadbooks1 is offline   Reply With Quote
Old 09-09-2016, 02:17 PM   #9
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 4,078
Karma: 8640555
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, Kobo AuraHD/Aura6"/AuraH2O/GloHD/AuraOne
Quote:
Originally Posted by eggheadbooks1 View Post
Quote:
Originally Posted by Doitsu View Post
@eggheadbooks1: Kindles and Kindle apps support the following Unicode characters that you could use instead of a Webdings symbol:

&#x266b; Unicode Character 'BEAMED EIGHTH NOTES' (U+266B)
Doitsu: This is the exact symbol and the unicode works! In Kindle. But not in ePubs. Sigh.

Thus far, then, I can use the unicode for Kindle, and the image for ADE and the likes of Aldiko, but not for Kobo.

Well, one down and only one to go. All continued help appreciated.
Which firmware and font were you using on your Kobo Touch? All my Kobos are newer models than the Kobo Touch and I'm fully up-to-date with the firmware ...

That particular unicode char - 'BEAMED EIGHTH NOTES' (U+266B) - displays OK with the following 8 built-in fonts on my Kobo GloHD:
Amasis, Caecilia, Georgia, Malabar, Avenir, Gill Sans, Kobo Nickel, OpenDyslexic as long as I'm reading the epub as a kepub.

If I'm reading as a plain standard epub, it's OK in 4 of them, Amasis, Caecilia, Georgia, Malabar.

Last edited by pdurrant; 10-28-2016 at 06:22 AM. Reason: fixed quote tags
jackie_w is offline   Reply With Quote
Old 09-09-2016, 02:36 PM   #10
eggheadbooks1
Read, don't parrot.
eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.
 
Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
Quote:
Originally Posted by jackie_w View Post
Which firmware and font were you using on your Kobo Touch? All my Kobos are newer models than the Kobo Touch and I'm fully up-to-date with the firmware ...
It's an older Kobo Touch. 3.3.0 is the version. It's so old it doesn't even have a button to update the firmware. I was using Georgia font.

The unicode font did not work in ADE either. I take the position that ADE is such crap that if I can get something to work there, it usually works elsewhere. This time, though, the inline image styling worked in ADE but not Kobo. In the latest GitHub Kobo specs, it says to avoid inline styling in text, and I would think that applies to images, too. Switching to styling in the CSS as per Hitch's suggestion did the trick.

I cannot use the unicode in the ePub because I have no way of knowing who will be using what device/app or what font. But the image system now works as intended, so I am happy with the result.

The wonderful thing about the Unicode in Kindle, too, is that it also works in the older Kindle DX, or so says Previewer. So that avoids having to use media queries.

Last edited by pdurrant; 10-28-2016 at 06:23 AM. Reason: fixed quote tags
eggheadbooks1 is offline   Reply With Quote
Old 09-09-2016, 02:46 PM   #11
eggheadbooks1
Read, don't parrot.
eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.
 
Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
Hitch:

I just had a thought. I remember in the past struggling with trying to put images in an Apple version of my last non-fiction book. Apple demand that you style the image size as follows:

Quote:
HTML:
<div class="image-container">
<img src="images/bears.jpg" alt="three bears peer at goldie locks"/>
</div>
and then in the CSS:

Quote:
img {height: 100%;}
.image-container {height: 100vh;}
But how does that work if you have both horizontal and vertical images, or differently sized images (50%, 75%, etc)?

I think I tried making different containers (so that each image was 100% of the size of, for example, a 50%-of-screen image) but that didn't work.

Also, in this latest ebook, in order to make the large cover fit and sit properly, I have to style inline there:

Quote:
<div style="text-align: center;"><img alt="cover" height="100%" src="../Images/cover.jpg"/></div>
This overrides the 1em in the CSS, though I don't understand why exactly.
eggheadbooks1 is offline   Reply With Quote
Old 09-09-2016, 03:27 PM   #12
Tex2002ans
Guru
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 897
Karma: 5454725
Join Date: Jul 2012
Device: Nook
Quote:
Originally Posted by eggheadbooks1 View Post
Also, Hitch, I will try using CSS instead of inline styling. That may work better. Will report back.
Not too sure if you were aware of this topic. Way back in 2013 we had a discussion in "Apple symbol and other special characters in ePub":

https://www.mobileread.com/forums/sho...d.php?t=222825

You may find a useful example or two there.

Quote:
Originally Posted by eggheadbooks1 View Post
I cannot use the unicode in the ePub because I have no way of knowing who will be using what device/app or what font.
You should be able to embed/subset a font that ONLY includes the ♫ character. Are you sure you did the HTML/CSS correctly? Or maybe you referenced the font on your computer but forgot to include it in the EPUB? (That is a very easy mistake to make.)

Last edited by Tex2002ans; 09-09-2016 at 03:35 PM.
Tex2002ans is offline   Reply With Quote
Old 09-09-2016, 04:16 PM   #13
eggheadbooks1
Read, don't parrot.
eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.eggheadbooks1 figured out that Keyser Söze was the Kevin Spacey character in less than 20 minutes.
 
Posts: 224
Karma: 110242
Join Date: Apr 2011
Device: Kindle Fire, Kobo Touch, Aldiko for Android
Hi Tex2002ans:

I did not embed the Unicode font in the ePub; I was hoping it would work automatically as it does in the Kindle (as per Doitsu's post). It didn't. So I am using a GIF for the ePub. Works just as well now that I tweaked the code.

I don't how to make a subset of the font, that only includes the one character, to embed. Though that would be good to know for future issues. I'll google it.
eggheadbooks1 is offline   Reply With Quote
Old 09-10-2016, 03:18 AM   #14
Tex2002ans
Guru
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 897
Karma: 5454725
Join Date: Jul 2012
Device: Nook
Quote:
Originally Posted by eggheadbooks1 View Post
I don't how to make a subset of the font, that only includes the one character, to embed. Though that would be good to know for future issues. I'll google it.
There are quite a few methods to subset fonts, but Calibre made it super easy.

After you have the fonts in your EPUB + correct CSS, you could either:
  • Right click a book in your library and press "Polish Books" -> "Subset all embedded fonts".
  • If you have the book open in the Calibre Editor, press "Tools" -> "Subset Embedded Fonts"

Open Source Fonts

There are plenty of free fonts you can choose from to embed:

https://en.wikipedia.org/wiki/Open-s...code_typefaces

One of the fonts that includes the ♫ is Deja Vu Sans, which can be downloaded here:

http://dejavu-fonts.org/wiki/Main_Page

You can easily add the OTF or TTF fonts to the EPUB just like you add any other file. Then you just have to make sure to properly add the references to CSS.

Example Musical Notes EPUB

Here is example code (sample EPUBs attached to this post):

Quote:
<p><span class="musicnote">♩</span> &amp;#x2669; Unicode Character 'QUARTER NOTE' (U+2669)</p>

<p><span class="musicnote">♪</span> &amp;#x266a; Unicode Character 'EIGHTH NOTE' (U+266A)</p>

<p><span class="musicnote">♫</span> &amp;#x266b; Unicode Character 'BEAMED EIGHTH NOTES' (U+266B)</p>

<p><span class="musicnote">♬</span> &amp;#x266c; Unicode Character 'BEAMED SIXTEENTH NOTES' (U+266C)</p>

<p class="NoIndent">When you see this symbol <span class="musicnote">♫</span> in the chapter, listen to the song that accompanies the story.</p>
Here is the CSS you need to tell the musical notes to use "Deja Vu Sans" as the font:

Quote:
@font-face {
font-family: 'DejaVuSans';
font-style: normal;
font-weight: normal;
src: url(../Fonts/DejaVuSans.ttf);
}

.musicnote {
font-family: 'DejaVuSans', serif;
}
I attached 3 EPUBs:
  • [NoFont]
    • This is just the HTML, no CSS.
  • [YesFont]
    • This includes the entire "Deja Vu Sans" font (739.33 KB).
    • Total EPUB Size: 373.0 KB.
  • [YesSubsetFont]
    • I subset this using Calibre, and the font became 175.01 KB.
    • Total EPUB Size: 62.8 KB.

ADE Before/After:

Click image for larger version

Name:	ADEBefore.png
Views:	78
Size:	58.2 KB
ID:	151482 Click image for larger version

Name:	ADEAfter.png
Views:	72
Size:	57.6 KB
ID:	151481

Kindle Before/After:

Click image for larger version

Name:	KindleBefore.png
Views:	64
Size:	43.7 KB
ID:	151484 Click image for larger version

Name:	KindleAfter.png
Views:	76
Size:	44.6 KB
ID:	151483

Quote:
Originally Posted by eggheadbooks1 View Post
I did not embed the Unicode font in the ePub; I was hoping it would work automatically as it does in the Kindle (as per Doitsu's post). It didn't. So I am using a GIF for the ePub. Works just as well now that I tweaked the code.
In the topic I linked to there was a bit of discussion of many of the Pros/Cons of the different methods (Font/Bitmap/Vector). I will just mention a few of the downfalls of the Bitmap method off the top of my head:
  • Not searchable
  • Not copy/pastable
  • Doesn't work well with Text-to-Speech (well... you could add an alt to your <img>)
  • Doesn't match user preferences
    • The user might want to read in a different color font .
    • Might not work well in Night Mode (could have a huge white background behind the image).
  • Doesn't upscale/downscale well (unless SVG)

As you can probably see, many of the cons are sort of "hidden" from plain view. The images LOOK/WORK fine on the surface, but underneath, there are issues that creep up.
Attached Files
File Type: epub MusicNotes[NoFont].epub (2.0 KB, 57 views)
File Type: epub MusicNotes[YesFont].epub (373.0 KB, 48 views)
File Type: epub MusicNotes[YesSubsetFont].epub (62.8 KB, 49 views)

Last edited by Tex2002ans; 09-10-2016 at 03:49 AM.
Tex2002ans is offline   Reply With Quote
Old 09-10-2016, 04:52 AM   #15
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 5,916
Karma: 55190324
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, and NookColor. 2 Droid, 1 Win8 ePUB rdrs
Quote:
Originally Posted by eggheadbooks1 View Post
We have lift off!

Hitch: set the image height in CSS instead of inline and now the image appears in my older Kobo.
Doitsu: Kindle problem solved using Unicode.

Many thanks.
It's weird, but we've had similar experiences. Not recently, but..I don't know, 3, maybe even 4 years back, like that? (Damn. Hard to believe I've been at this as long as I have.) Glad it worked.

I see your other post about the hell of Apple images; I'm beat tonight, and tied up MOST of tomorrow, but I'll try to get to it tomorrow night or Sunday, if I can. In the interim, I see that Tex has jumped in, and his attention to detail is really QUITE excellent, you can bank on his stuff, too.

(That doesn't mean that everyone else's aren't excellent; just that Tex tends to do the nitty-gritty details that the rest of us skip over. :-)

Hitch
Hitch is offline   Reply With Quote
Reply

Tags
em value, image scaling, inline image

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 05:08 AM.


MobileRead.com is a privately owned, operated and funded community.