07-07-2012, 02:22 PM | #1 |
Junior Member
Posts: 6
Karma: 10
Join Date: Mar 2011
Device: none
|
Embedding fonts in ePub using Sigil
This is all so confusing and frustrating. I've Googled and found tons of answers. However, not the right one.
I am not a Sigil expert. I have an ePub book that has Mangal fonts to show Hindi. It shows correctly on some devices and ???? on other. I read that if I embed those fonts in my ePub file, it will show correctly on ALL devices. If I am right, all I want to do is add Mangal fonts to my fonts folder (or am I totally wrong?), save my ePub file. Is this possible? Can anyone give me a step-by-step without sending me to a link? Please. |
07-07-2012, 02:38 PM | #2 |
Sigil developer
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
Try the Sigil User Guide section for embedding fonts. But not all devices support all fonts.
|
07-07-2012, 04:14 PM | #3 | |
Evangelist
Posts: 490
Karma: 1665031
Join Date: Nov 2010
Location: Vancouver Island, Nanaimo
Device: K2 (retired), Kobo Touch (passed to the wife), KGlo, Galaxy TabPro
|
Note this is a simplified step by step. Once you have mastered this, then some other things are possible but you will need to make sure the basics are working first. Substitute your font for the one listed in this example.
Quote:
The p { ... } can be changed to a class if need be, I prefer to keep my epubs very bare bones and use classes to override my base <p> where only required. Bold / Italics can be added by: i, em { font-family: "Hindi_italics"; } b { font-family: "Hindi_bold"; } @font-face { font-family: "Hindi_bold"; font-weight: bold; font-style: normal; src: url(../Fonts/Hindi-Bold.ttf); } @font-face { font-family: "Hindi_italics"; font-weight: normal; font-style: italic; src: url(../Fonts/Hindi-Italic.ttf); } |
|
07-08-2012, 09:05 PM | #4 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
BTW, just make sure in your experimenting that you use public domain fonts. Some fonts are OK on your computer, but can not be embedded. This can cause mysterious not working when you have done everything fine otherwise, I understand.
|
10-11-2012, 05:12 PM | #5 |
Very Slow Learner
Posts: 51
Karma: 788
Join Date: Jul 2012
Location: UK
Device: none
|
Many thanks, Danger, that worked fine for what I've been looking for.
|
10-12-2012, 01:51 AM | #6 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Be aware that the @font-face must be the first lines in the CSS.
|
10-12-2012, 11:27 AM | #7 |
Guru
Posts: 718
Karma: 1085610
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-T1, 1825PT, Galaxy Tab, One X, TF700T, Aura HD, Nexus 7
|
|
10-12-2012, 12:47 PM | #8 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
I will have too look it up, but I definitely remember that. Can't remember why though.
|
10-12-2012, 01:54 PM | #9 |
frumious Bandersnatch
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Maybe you are confusing it with @import, which must be the first thing if I remember correctly.
Or maybe there's a bug of some reader... |
10-12-2012, 03:14 PM | #10 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
That might very well be true Jellby. That sounds like something I might confuse in my head. In the beginning I used an additional stylesheets for the @font-face and used @import for that. It might very well be that this merged in my head.
|
10-20-2012, 02:37 PM | #11 |
Member
Posts: 23
Karma: 10
Join Date: Sep 2012
Location: Rio de Janeiro - Brasil
Device: Genesis GT-1230
|
Hi, Toxaris!
I'm trying to change the default font too, but it's not working. I want to use two different fonts for titles and text. The text font is working fine, but the title font isn't... although it works in Sigil. The only thing I could do was to change its color with "color:#FFC800". What could be wrong in my CSS? @font-face { font-family: Book Antiqua; font-style: normal; font-weight: normal; src:url("../Fonts/BKANT.TTF"); } @font-face { font-family: Aphrodite Pro; font-style: normal; font-weight: bold; src:url("../Fonts/Aphrodite Pro.otf"); } p+p { font-family: Book Antiqua; text-indent:1.5em; text-align: justify; font-size: 1.10em; } .title { font-family: Aphrodite Pro; color:#FFC800; margin-top:0em; margin-bottom:.65em; page-break-after:avoid; font-size: 3.8em; text-align: center; text-indent:0em; } |
10-20-2012, 04:02 PM | #12 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Ditch the spaces in the names.
|
10-21-2012, 03:26 AM | #13 |
frumious Bandersnatch
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Or wrap them in quotes.
|
10-21-2012, 03:19 PM | #14 |
Member
Posts: 23
Karma: 10
Join Date: Sep 2012
Location: Rio de Janeiro - Brasil
Device: Genesis GT-1230
|
Thank you, guys!
Wrapping them in quotes did the trick. |
07-09-2013, 12:42 PM | #15 |
Rookie Know-It-All
Posts: 7
Karma: 10
Join Date: Mar 2012
Location: South Florida
Device: I use them all!
|
My first time working with embedding fonts but I've already made 4 successful ePubs for clients.
@font-face { font-family: "Book Antiqua"; font-weight: normal; font-style: normal; src: url('../Fonts/BKANT.TTF'); } @font-face { font-family: "Book Antiqua"; font-weight: bold; font-style: normal; src: url('../Fonts/ANTQUAB.TTF'); } @font-face { font-family: "Book Antiqua"; font-weight: normal; font-style: italic; src: url('../Fonts/ANTQUAI.TTF'); } @font-face { font-family: "Courier New"; font-weight: normal; font-style: normal; src: url('../Fonts/cour.ttf'); } body { font-family: "Book Antiqua", serif; margin: 1em 1em 1em 1em; background: #FFFF99; } .italics { font-style: italic; } My problem is italics, bold, etc don't respond. I use classes in spans to implement italics, bold, etc. but <i></i> doesn't allow italics either. E.G: ...<span class="italics">The Seth Material</span>... All the text is standard. Any ideas? |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Embedding Fonts in EPUB- iPad | matteino10 | Apple Devices | 0 | 03-15-2012 09:32 AM |
Embedding fonts in EPUB? | Acey | Calibre | 19 | 11-06-2011 10:01 AM |
Sigil 0.2.0 Embedding Fonts - Adding all the bits | ghostyjack | Sigil | 30 | 05-14-2011 03:30 AM |
Embedding fonts with Sigil? | MacEachaidh | Sigil | 4 | 08-20-2010 07:16 AM |
Embedding fonts with Sigil and Calibre | JaneFancher | Calibre | 1 | 04-09-2010 12:35 AM |