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

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 10-25-2011, 03:46 PM   #1
LaurelRusswurm
self publishing novelist
LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.
 
LaurelRusswurm's Avatar
 
Posts: 30
Karma: 54620
Join Date: Oct 2011
Location: dual citizenship in the interwebz and canada
Device: none
Is it possible to really embed fonts yet?

Q: Is it possible to bundle free fonts inside the ePub container so they can work on the ereader?

Backstory: Although I don't actually have an ebook reader, I have been playing around with ebooks on my computer (Calibre Reader). This is a big deal for me as I am a novelist learning about self publishing, and I want my novels to be a perfect as possible.

I played around with Calibre, and it seems I can fairly easily make an ePub but I was having trouble getting the table of contents to do what i want, and most especially to include fonts. I have used markup and CSS making websites, which ought to help me make this work.

So I've been trying to use Sigil, since it has the advantage of allowing me direct access to the code, an easy way to make chapter stops, and a place to load fonts and css. Except I can't actually edit the CSS in Sigil, and no matter what I do, the fonts I include don't work. So it occurred to me to seek expert advice, which is how I found my way here.

Old threads here say first it is not possible, later threads talk about doing the font face thing, but I hate the idea. Just I hated that the only way I could include fonts in my word press blog was to use Google fonts. The essential problem I see is that the existence of the font is in Google's hands, or it depends on the continued existence of the website where the font can be found, and no broken links.

What I want to truly embed my chosen fonts so they are there in the reader, bundled with the book. They don't take up much room. If the ebook sits in the ereader, why can't the publisher's fonts sit there in the epub file too?

There is no reason I can see why this should not be possible, if the markup is done the same way it would be for websites, with the publisher's choice listed first, then alternates, so the reader user can default to their own preferences if they like.
LaurelRusswurm is offline   Reply With Quote
Old 10-25-2011, 05:40 PM   #2
Pablo
Guru
Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.
 
Pablo's Avatar
 
Posts: 757
Karma: 3058207
Join Date: Mar 2009
Location: Rosario, Argentina
Device: SONY PRS-505, PRS-T2
Have a look at my ePub tutorial (link in my signature). It covers the basics of html, css and Sigil, including font embedding among other formatting tasks.
I hope you find it useful.
And welcome to MobileRead!!!
Pablo is offline   Reply With Quote
Old 10-25-2011, 09:12 PM   #3
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: 2,904
Karma: 4329385
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"/AuraH2O
Physically embedding fonts inside an epub is easily done, once you know what to do. Publishers do it often (usually with the Charis SIL font in the epubs I've encountered). You still need to do the @font-face statements, but they point to the font files actually inside the epub

If you plan to publish, you would need to read the font copyright carefully to make sure that distributing the fonts was legal.

I guess you'd also need to check that embedded font epubs worked correctly on a good range of the most popular readers. I can vouch for the fact they work on all the readers I own.
jackie_w is offline   Reply With Quote
Old 10-25-2011, 10:22 PM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 38,454
Karma: 19135915
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2), Sony PRS-650, Sony PRS-T1, nook STR, iPad 1, iPhone 5
Quote:
Originally Posted by jackie_w View Post
Physically embedding fonts inside an epub is easily done, once you know what to do. Publishers do it often (usually with the Charis SIL font in the epubs I've encountered). You still need to do the @font-face statements, but they point to the font files actually inside the epub

If you plan to publish, you would need to read the font copyright carefully to make sure that distributing the fonts was legal.

I guess you'd also need to check that embedded font epubs worked correctly on a good range of the most popular readers. I can vouch for the fact they work on all the readers I own.
Font embedding doesn't work properly on the Kobo. They botched it big time. If you put the font-family directive in body, it doesn't display. That is how most publishers do it to activate the main embedded font(s).
JSWolf is online now   Reply With Quote
Old 10-26-2011, 03:26 PM   #5
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 65,436
Karma: 43770933
Join Date: Nov 2006
Location: UK
Device: Kindle Voyage, iPad Mini, iPhone 4, MS Surface Pro, N7
This has nothing to do with Calibre; moved to the ePub forum.
HarryT is online now   Reply With Quote
Old 10-28-2011, 04:24 AM   #6
LaurelRusswurm
self publishing novelist
LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.
 
LaurelRusswurm's Avatar
 
Posts: 30
Karma: 54620
Join Date: Oct 2011
Location: dual citizenship in the interwebz and canada
Device: none
I will take a look this weekend, Pablo, thanks!
LaurelRusswurm is offline   Reply With Quote
Old 10-28-2011, 04:37 AM   #7
LaurelRusswurm
self publishing novelist
LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.
 
LaurelRusswurm's Avatar
 
Posts: 30
Karma: 54620
Join Date: Oct 2011
Location: dual citizenship in the interwebz and canada
Device: none
Quote:
Originally Posted by jackie_w View Post
You still need to do the @font-face statements, but they point to the font files actually inside the epub
Am I correct in thinking this will work even if the ebook is offline?

Quote:
Originally Posted by jackie_w View Post
If you plan to publish, you would need to read the font copyright carefully to make sure that distributing the fonts was legal.
I am very much aware of issues of font copyright, and have been at pains to use only free fonts bundled with clear licenses absent contradictory statements.

Thanks very much for your help, jackie_w
LaurelRusswurm is offline   Reply With Quote
Old 10-28-2011, 04:46 AM   #8
LaurelRusswurm
self publishing novelist
LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.
 
LaurelRusswurm's Avatar
 
Posts: 30
Karma: 54620
Join Date: Oct 2011
Location: dual citizenship in the interwebz and canada
Device: none
Quote:
Originally Posted by JSWolf View Post
Font embedding doesn't work properly on the Kobo. They botched it big time. If you put the font-family directive in body, it doesn't display. That is how most publishers do it to activate the main embedded font(s).
I am too tired to look now, but I assumed that it would be possible to identify the fonts in as you would on a webpage, listing my chosen font, followed by a second common font choice and backing them both up with serif or sans-serif just in case.

I appreciate the heads up about the Kobo reader, JSWolf, thanks. [Especially as I haven't yet had the opportunity to use one.]

Again, thanks to all... I won't have time to try any of this 'til the weekend, but it's fabulous to have some hope of actually succeeding
LaurelRusswurm is offline   Reply With Quote
Old 10-28-2011, 04:53 AM   #9
LaurelRusswurm
self publishing novelist
LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.LaurelRusswurm knows the way to San Jose.
 
LaurelRusswurm's Avatar
 
Posts: 30
Karma: 54620
Join Date: Oct 2011
Location: dual citizenship in the interwebz and canada
Device: none
No worries, HarryT, I'm still finding my way around; I didn't realize there were segments for formats; what actually brought me here were old font threads in the Calibre section. I'll work on it
LaurelRusswurm is offline   Reply With Quote
Old 10-28-2011, 06:49 AM   #10
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: 2,904
Karma: 4329385
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"/AuraH2O
Quote:
Originally Posted by LaurelRusswurm View Post
Am I correct in thinking this will work even if the ebook is offline?
I don't understand the question. It will work for an epub loaded onto an ereader, as long as the ereader's epub renderer understands embedded fonts.
jackie_w is offline   Reply With Quote
Old 10-28-2011, 12:04 PM   #11
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 38,454
Karma: 19135915
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2), Sony PRS-650, Sony PRS-T1, nook STR, iPad 1, iPhone 5
In the CSS
Code:
@font-face {
  font-family: "Charis SIL";
  font-weight: normal;
  font-style: normal;
  src: url(fonts/CharisSILR.ttf)
}
@font-face {
  font-family: "Charis SIL";
  font-weight: bold;
  font-style: normal;
  src: url(fonts/CharisSILB.ttf)
}
@font-face {
  font-family: "Charis SIL";
  font-weight: normal;
  font-style: italic;
  src: url(fonts/CharisSILI.ttf)
}
@font-face {
  font-family: "Charis SIL";
  font-weight: bold;
  font-style: italic;
  src: url(fonts/CharisSILBI.ttf)
}
@font-face {
  font-family: "Old Claude LP Oldstyle Figures";
  font-weight: normal;
  font-style: normal;
  src: url(fonts/Old_Claude_LP_Oldstyle_Figures.ttf)
}
body {
  font-family: "Charis SIL", serif;
  widows: 0;
  orphans: 0;
  margin-top: 0;
  margin-bottom: 0;
  margin-left: 0;
  margin-right: 0;
  text-align: justify;
  font-size: 95%;
  line-height: 1.04em
}
In the OPF in the manifest section
Code:
<item href="fonts/CharisSILB.ttf" id="font1" media-type="application/x-font-ttf"/>
<item href="fonts/CharisSILBI.ttf" id="font2" media-type="application/x-font-ttf"/>
<item href="fonts/CharisSILI.ttf" id="font3" media-type="application/x-font-ttf"/>
<item href="fonts/CharisSILR.ttf" id="font4" media-type="application/x-font-ttf"/>
<item href="fonts/Old_Claude_LP_Oldstyle_Figures.ttf" id="font5" media-type="application/x-font-ttf"/>
Also in the CSS
Code:
span.drop-cap {
	font-family: "Old Claude LP Oldstyle Figures", serif;
	font-weight: normal;
	font-style: normal;
	font-size: 1.17em;
}
Those are all the relevant bits of code in the CSS and OPF for embedding these fonts. Also, the font files are in the directory fonts which is right under the directory the CSS and OPF are in. /OEBS/fonts/ OEBS has all the other files (in this case) and fonts has the fonts.

I hope this helps. This will mostly work for iBooks but you do have to add some non-standard code elsewhere for this to work. ON the Kobo, they botched things big time and refuse to listen to the bug report I've mentioned to them. The font-family in the body doesn't work on a Kobo. The drop-cap font will work fine. For a Kobo, you'll have to move the font-family from body to all the other CSS styles you use where that font is to be used. But in most cases like Sony, B&N, ADE (desktop), iRiver, Onyx, Boox, Bookeen, etc, this will work as is.

Charis SIL is the font that most publishers embed as it is a good looking font and it's free.
JSWolf is online now   Reply With Quote
Old 10-29-2011, 06:26 AM   #12
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 65,436
Karma: 43770933
Join Date: Nov 2006
Location: UK
Device: Kindle Voyage, iPad Mini, iPhone 4, MS Surface Pro, N7
Will hard-coding the font in the "body" style not prevent the user from choosing a different font on those reading devices which provide such an option?
HarryT is online now   Reply With Quote
Old 10-29-2011, 10:29 AM   #13
pholy
Booklegger
pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.
 
pholy's Avatar
 
Posts: 1,800
Karma: 7999034
Join Date: Jun 2009
Location: Toronto, Ontario, Canada
Device: BeBook(1 & 2010), PEZ, PRS-505, Kobo BT, PRS-T1, Playbook, Kobo Touch
Harry, I think you are probably right, although it depends on the reader of course. Certainly Kobo has chosen to override a 'body' choice; I'm not sure what my new Sony T1 does yet.
In my opinion, having the publisher force a font choice on the user removes one of the nicer features of ebooks. I think the user, not the publisher and not the ereader maker, should have the choice of body font. I'm a hopeless idealist.
pholy is offline   Reply With Quote
Old 10-29-2011, 10:49 AM   #14
dwig
Guru
dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.
 
dwig's Avatar
 
Posts: 996
Karma: 1843322
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Dell Venue 8 Pro - Retired:Kindle 3, Clie UX50, T415, ...
Quote:
Originally Posted by pholy View Post
...
In my opinion, having the publisher force a font choice on the user removes one of the nicer features of ebooks. I think the user, not the publisher and not the ereader maker, should have the choice of body font. ...
+1

Using an embedded font for some special text is fine, provided the font is chosen well and that the book will still look decent when the text defaults to the reader's own font instead of the embedded font.

Any use of an embedded font should be made based on actual experience with that particular font on a wide range of devices. Experience with how a particular font looks in print on paper is of absolutely no value is choosing a font for an ebook.
dwig is offline   Reply With Quote
Old 10-29-2011, 10:50 AM   #15
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 65,436
Karma: 43770933
Join Date: Nov 2006
Location: UK
Device: Kindle Voyage, iPad Mini, iPhone 4, MS Surface Pro, N7
Quote:
Originally Posted by pholy View Post
I think the user, not the publisher and not the ereader maker, should have the choice of body font. I'm a hopeless idealist.
Exactly - that was precisely my point. By all means use embedded fonts for such things as titles, but please, Mr. Publisher, leave the choice of body font to the reader.
HarryT is online now   Reply With Quote
Reply

Tags
calibre, embed, epub, fonts, sigil

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to embed fonts in ePub after Calibre fiery ePub 74 11-10-2014 08:14 PM
Best Practice: Embed Fonts?? luthar28 ePub 37 11-01-2011 05:16 AM
Is it possible to UN embed fonts? lmronan Sigil 14 06-04-2010 10:26 AM
Can it embed fonts? chalimac Kobo Reader 0 05-01-2010 04:47 PM
Any free software can embed fonts in epub droople ePub 4 03-06-2010 06:40 PM


All times are GMT -4. The time now is 04:28 PM.


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