Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 01-18-2014, 11:47 AM   #1
Rand Brittain
Bookmaker
Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.
 
Posts: 427
Karma: 2143650
Join Date: Sep 2010
Device: Cybook Opus
Icon Fonts and eReaders

I've been working on converting a book to ePub that uses a set of eight colored icons to distinguish certain concepts it's trying to explain. Having had difficulties getting image files to line up right, I've been trying to use an icon font from IcoMoon to represent those eight icons in the ePub.

As far as Calibre's editor is concerned, and Sigil too, this works great! I was able to replace the bullet points with the icons using the :before element and get them to look right.

Unfortunately none of this shows up when I transfer the book to an eReader (either Kobo or Nook) and view the files there.

Does anybody have an idea of what I could do to get the icons visible to readers?
Rand Brittain is offline   Reply With Quote
Old 01-18-2014, 12:05 PM   #2
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Without some code, it will be difficult...
Toxaris is offline   Reply With Quote
Advert
Old 01-18-2014, 12:37 PM   #3
Doitsu
Grand Sorcerer
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: 5,680
Karma: 23983815
Join Date: Dec 2010
Device: Kindle PW2
******************

Last edited by Doitsu; 01-18-2014 at 02:50 PM.
Doitsu is offline   Reply With Quote
Old 01-18-2014, 01:21 PM   #4
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Rand Brittain View Post
As far as Calibre's editor is concerned, and Sigil too, this works great! I was able to replace the bullet points with the icons using the :before element and get them to look right.
While the :before pseudo-element should be supported in ePub 2, the content attribute, as far as I know, is not, and you're probably using it. Calibre and Sigil are using standard HTML renderers for display, which support parts of CSS not required in ePub, but ebook readers are a different beast.

Since you say "replace the bullet", I guess you are using lists... Stay away from them if you require any special styling. Instead use an embedded font, an explicit character and hanging indent (or whatever).
Jellby is offline   Reply With Quote
Old 01-18-2014, 01:49 PM   #5
Rand Brittain
Bookmaker
Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.
 
Posts: 427
Karma: 2143650
Join Date: Sep 2010
Device: Cybook Opus
Quote:
Originally Posted by Jellby View Post
While the :before pseudo-element should be supported in ePub 2, the content attribute, as far as I know, is not, and you're probably using it. Calibre and Sigil are using standard HTML renderers for display, which support parts of CSS not required in ePub, but ebook readers are a different beast.
Bluh, bluh, I am.

Working up bulleted lists where some bullets use standard bullets and some use a fancy icon is going to be a pain, then.

Is EPUB3 any better at this, not that it helps much in this situation?
Rand Brittain is offline   Reply With Quote
Advert
Old 01-18-2014, 01:53 PM   #6
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
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
Quote:
Originally Posted by Rand Brittain View Post
Bluh, bluh, I am.

Working up bulleted lists where some bullets use standard bullets and some use a fancy icon is going to be a pain, then.

Is EPUB3 any better at this, not that it helps much in this situation?
here is the support requirements for CSS in ePub 3 from our wiki EPub_3#CSS.

Dale
DaleDe is offline   Reply With Quote
Old 01-18-2014, 02:22 PM   #7
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Rand Brittain View Post
Working up bulleted lists where some bullets use standard bullets and some use a fancy icon is going to be a pain, then.
Standard bullets are just a particular character, which you can write as •, so it can be as simple as:

Code:
<div class="list">
<p><span class="standard_bullet">&bull;</span> First item.</p>
<p><span class="fancy_bullet">&bull;</span> Second (fancy) item.</p>
</div>
Where "standard_bullet" does nothing and "fancy_bullet" selects an embedded font, assuming your fancy icon is defined in the bullet glyph of the font. The class "list" would take care of the proper alignment and spacing within the list.

Or, if the whole list is going to use one bullet or the other:

Code:
<div class="standard_list">
<p><span class="bullet">&bull;</span> First item.</p>
<p><span class="bullet">&bull;</span> Second item.</p>
</div>

<div class="fancy_list">
<p><span class="bullet">&bull;</span> First (fancy) item.</p>
<p><span class="bullet">&bull;</span> Second (fancy) item.</p>
</div>
and you'd define different fonts for "div.standard_list span.bullet" and "div.fancy_list span.bullet".

Last edited by Jellby; 01-18-2014 at 02:24 PM.
Jellby is offline   Reply With Quote
Old 01-18-2014, 03:39 PM   #8
Rand Brittain
Bookmaker
Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.Rand Brittain ought to be getting tired of karma fortunes by now.
 
Posts: 427
Karma: 2143650
Join Date: Sep 2010
Device: Cybook Opus
Ah, that solution might actually be possible. Thanks!
Rand Brittain is offline   Reply With Quote
Reply

Tags
epub, font, icon fonts


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add alternate fonts without replacing system fonts.(this time this is a guide) techiemonkey Kindle Developer's Corner 17 09-12-2012 04:55 PM
An Observation on Fonts - Improving readability by using *bold* versions of fonts nesler General Discussions 12 06-24-2012 12:33 PM
need the fonts in /usr/java/lib/fonts of kindle touch5.0.0 hanpal Kindle Developer's Corner 1 02-20-2012 10:40 AM
Touch Fonts question (special characters in stock and custom fonts) levil Kobo Reader 20 09-23-2011 01:51 PM
What Fonts are used in various eReaders? What Font options are available? tomereader General Discussions 28 08-20-2010 05:40 AM


All times are GMT -4. The time now is 11:26 AM.


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