02-26-2013, 10:46 AM | #31 |
Connoisseur
Posts: 86
Karma: 470352
Join Date: Dec 2012
Device: Kindle Fire, IPad
|
Sorry guys, still cant get this right. I added the extra stylesheet, made sure it was in the manifest, the font was in the folder and the style was declared. I see the font and stlye thru Sigil but when I publish just the coloer os there and not the font.
I removed the extra stylesheet and added the style to the stylesheet with in the epub and I still get the color but not the font. test epub is in the attached. any help? |
02-26-2013, 10:57 AM | #32 |
Grand Sorcerer
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
What do you mean by "when I publish"?
EDIT: also, I see no font-face declarations in your CSS. Custom embedded fonts require @font-face declarations. See the examples provided in some of the earlier posts. Last edited by DiapDealer; 02-26-2013 at 11:05 AM. |
02-26-2013, 11:13 AM | #33 | |
Well trained by Cats
Posts: 29,791
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Code:
font-family: "Bradley Hand ITC"; |
|
02-26-2013, 12:43 PM | #34 |
Resident Curmudgeon
Posts: 73,931
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
The reason you see some of the fonts in Sigil is that they are being picked up by being installed in your OS. They won't be picked up in ADE without actually being embedded.
Another thing, the code is a real mess. Cleaning it up would also be a good idea. |
02-26-2013, 04:45 PM | #35 | ||||
A Hairy Wizard
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Step 1:
Make sure ALL the special fonts you are using are embedded by adding the file in the Fonts folder. Click "add existing files", point at the file and Sigil will put it in the correct place. Step 2: Place a font face declaration in your stylesheet (in your case "stylesheet.css") for EACH different font you wish to embed. It should look like this Quote:
You need to change the bold areas to correspond to your particular font. Notice the full path required in the url "..Fonts/" before the filename...that is important. Quote:
You will need to do this for EACH font you want to embed. Step 4: Define a class to use the font you declared with the Font Face. This also goes in your stylesheet. Quote:
specialfont with a different class name for each font (specfont1, specfont2, etc.) It's better to be descriptive so you can remember which font does what. (no spaces) yourFont with the name you called the font in your font face declaration. cursive with whatever fallback font you want to use if the reader doesn't have or support your embedded font. Make sure you surround the font names with quotes if it has any spaces in it. Step 5: You need to tag the text you wish to use so that the browser knows you want to use a special font on it. You do this by giving it the CLASS that you designated in your stylesheet (step 4). Quote:
Step 6: As JSWolf noted, your code is awfully messy - a lot of extraneous markups and stuff that doesn't need to be in there. That is normal to see when you have automatic conversion (like Calibre) of a document (like Word). It is not REQUIRED to clean it up, but not cleaning it makes it much more difficult to determine exactly what is being done to your text and how to change it. Here is an example of clean code from your first page (step5.html) compare it to what you have and you will see a big difference. Realize that there are many different ways of doing this, this is just a quick example. Spoiler:
I hope that helps you out! [edit:] I put the style definitions in the head of this document so you could see them - all the stuff between the <style></style> tags. Normally you put that in your stylesheet -without the <style></style> tags. Last edited by Turtle91; 02-26-2013 at 05:32 PM. |
||||
02-26-2013, 07:23 PM | #36 |
Bookmaker & Cat Slave
Posts: 11,461
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Hmmmm...and here we are, back at the basic HTML and CSS questions, again. Despite the entertaining discussion about whether or not someone should buy a tablet (both Diap and Wolfie were right, possibly a first), really, this has almost zip to do with Sigil, particularly a question like, how to assign a particular font to a particular paragraph. Y'know what I mean? I know we all get bored around here, but, at that point, I'd have thought it should have moved to the epub or the workshop forum. How to add fonts in Sigil is a Sigil question. How to use them at all isn't. Nothing against the OP.
Just my $.02. Hitch |
02-26-2013, 08:09 PM | #37 |
Well trained by Cats
Posts: 29,791
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
@Hitch
Amen This forum is about how to USE Sigil. Not how to do EPUB (or a EPUB that will convert to something else). Folks: please take basic HTML, CSS and EPUB questions to the appropriat forums. Now! If the HTML and CSS Validate and Sigil has problems with that. Bring it on |
02-26-2013, 08:14 PM | #38 |
Grand Sorcerer
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
02-26-2013, 08:19 PM | #39 |
Bookmaker & Cat Slave
Posts: 11,461
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
|
02-26-2013, 08:48 PM | #40 |
A Hairy Wizard
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Hey....I mentioned Sigil in Step 1...doesn't that count??
|
02-27-2013, 02:38 PM | #41 |
Bookmaker & Cat Slave
Posts: 11,461
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
|
02-27-2013, 03:34 PM | #42 |
Resident Curmudgeon
Posts: 73,931
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Embedding fonts in kf8 | techiemonkey | Kindle Developer's Corner | 4 | 07-19-2012 12:11 PM |
Fonts embedding | 1drey | Writer2ePub | 3 | 06-17-2011 11:15 PM |
Embedding fonts | JaneFancher | Calibre | 14 | 04-10-2010 09:28 PM |
Embedding fonts | AprilHare | ePub | 6 | 01-02-2010 11:42 AM |
Embedding fonts | jash | Calibre | 2 | 09-09-2008 05:05 PM |