Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 03-16-2010, 02:59 PM   #1
ghostyjack
Guru
ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.
 
ghostyjack's Avatar
 
Posts: 718
Karma: 1085610
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-T1, 1825PT, Galaxy Tab, One X, TF700T, Aura HD, Nexus 7
Sigil 0.2.0 Embedding Fonts - Adding all the bits

If I embed a font into an epub and put the @font-face declaration statement into the CSS file, will sigil 0.2.0 add all the rest of the bits when saving? i.e. adding to manifest, etc.

I'm not sure all the bits that need to be added or in which files they need to be added.
ghostyjack is offline   Reply With Quote
Old 03-16-2010, 03:05 PM   #2
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by ghostyjack View Post
If I embed a font into an epub and put the @font-face declaration statement into the CSS file, will sigil 0.2.0 add all the rest of the bits when saving? i.e. adding to manifest, etc.
Yes!
Valloric is offline   Reply With Quote
Advert
Old 03-16-2010, 03:18 PM   #3
ghostyjack
Guru
ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.
 
ghostyjack's Avatar
 
Posts: 718
Karma: 1085610
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-T1, 1825PT, Galaxy Tab, One X, TF700T, Aura HD, Nexus 7


Fantastic!

I've been waiting for this to work as it's been pretty hit-and-miss for me in adding fonts and I've just been too lazy to ask on MR for help, now I don't have to.

Thanks Valoric, I know you've had a lot of praise for Sigil (I know as I've heap a little bit of that myself), but I can't thank you enough for it. As having an application that takes out all the work that would otherwise take quite some time to learn as a novice ebook maker means that I can make books that look good and still take my time to learn how this all works. I don't have to wait until I've gathered enough knowledge to hand-code them, I can just plough straight in.

Thanks again!
ghostyjack is offline   Reply With Quote
Old 04-07-2010, 07:23 PM   #4
JaneFancher
Zealot
JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.
 
JaneFancher's Avatar
 
Posts: 123
Karma: 496
Join Date: Feb 2009
Location: Spokane, Washington
Device: Kindle2
Can I scream?

I'm really frustrated at the moment. I've been trying to get my ToC and embedded fonts to work. I can't figure how to import an html doc into sigil and have it recognize the internal TOC, so I made a Mobi file MobiCreator with a ToC pointer, brought that into Calibre to create the epub. Everything looks fine in the Calibre reader except no pretty fonts. So I then brought the Calibre generated epub file into Sigil to embed the fonts.

I copied the fonts into the font folder. I put in the @font code into the style sheet, and everything looks PERFECT in sigil. I save down, open the epub in the Calibre reader...and it's a mess. None of the special fonts are showing and the sizes on the rest have gone haywire.

Anyone have any idea what might be going on? I'm really ready to tear my hair out on this one. I'm SOOOOOO close!
JaneFancher is offline   Reply With Quote
Old 04-07-2010, 10:07 PM   #5
Dellaster
本の虫
Dellaster has a complete set of Star Wars action figures.Dellaster has a complete set of Star Wars action figures.Dellaster has a complete set of Star Wars action figures.Dellaster has a complete set of Star Wars action figures.
 
Dellaster's Avatar
 
Posts: 242
Karma: 344
Join Date: May 2008
Location: USA
Device: Kindle3, DXG, Fire · iPad, iPod
Jane, it sounds like you're doing everything right so without looking at it there's no chance of determining what's wrong. There aren't, like, font declarations in the HTML as well as in the CSS are there?

As before, I'll take a look if you want me to. Maybe it just needs another pair of eyes.

Edit: I just sent you a nonsense-filled ePub with six different font embeddings. It works for me in EPUBReader (Firefox plugin), Adobe Digital Editions, Calibre, and Sigil. If it works for you as well, try to find what's different from yours. If mine doesn't work for you there's something fishy going on.

Last edited by Dellaster; 04-07-2010 at 10:15 PM. Reason: More
Dellaster is offline   Reply With Quote
Advert
Old 04-07-2010, 10:57 PM   #6
Dellaster
本の虫
Dellaster has a complete set of Star Wars action figures.Dellaster has a complete set of Star Wars action figures.Dellaster has a complete set of Star Wars action figures.Dellaster has a complete set of Star Wars action figures.
 
Dellaster's Avatar
 
Posts: 242
Karma: 344
Join Date: May 2008
Location: USA
Device: Kindle3, DXG, Fire · iPad, iPod
On a whim I had Calibre convert that ePub into an ePub. Yikes! Not a pretty result. Methinks Calibre doesn't handle embedded fonts well.
Dellaster is offline   Reply With Quote
Old 04-08-2010, 03:32 AM   #7
Montyp535
Zealot
Montyp535 began at the beginning.
 
Montyp535's Avatar
 
Posts: 141
Karma: 10
Join Date: Dec 2009
Location: MD
Device: (former) Ebookwise 1150, PB 302, (now) PB 612, PB Touch, HTC DesireS
with sigil you can create a real good epub - I don't need calibre for filling my reader - the font-thing is the next I will test...
Montyp535 is offline   Reply With Quote
Old 04-08-2010, 11:35 AM   #8
JaneFancher
Zealot
JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.
 
JaneFancher's Avatar
 
Posts: 123
Karma: 496
Join Date: Feb 2009
Location: Spokane, Washington
Device: Kindle2
I LOVE SIGIL! Valloric, if you were within reach, I'd hug you. You, too, Dellaster! Virtual group hug!

The problem was definitely in the reader. I didn't realize MobiPocket would read Epub files. It's perfect there. And the Firefox reader does it perfectly. I don't know why they don't show in Calibre...other books that used the same coding show their embedded fonts...but that's okay.

I'm so HAP-PY! It means using four different programs...WordPerfect to Namo to MobiCreator to Calibre to Sigil, but despite all those translations, it looks to end up with some fairly pristine files.

You programmers are goooooood!
JaneFancher is offline   Reply With Quote
Old 04-08-2010, 11:46 AM   #9
JaneFancher
Zealot
JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.
 
JaneFancher's Avatar
 
Posts: 123
Karma: 496
Join Date: Feb 2009
Location: Spokane, Washington
Device: Kindle2
Quote:
Originally Posted by Montyp535 View Post
with sigil you can create a real good epub - I don't need calibre for filling my reader - the font-thing is the next I will test...
The advantage for me of going through MobiCreator and Calibre is that it adds the cover as a cover rather than part of the main file, puts in the pointers for the internal ToC and breaks down the one huge file into several smaller files, which makes cleanup in Sigil much easier.

If I import the html directly into Sigil, it's one huge file and makes the poor program chug.

It sounds like a lot of steps, but it's a process my old brain understands. My total CSS programming experience probably amounts to... oh...four hours? Including analyzing other people's code.

I've been writing html for decades, but only when I needed it. And I'm pretty quick to figure what code is doing...but figuring out just where to put things in CSS is...intrustin'.

And since I'm trying to create a commercial product...I want to make something that all you guys aren't sneering at behind my back!!!!

Ah...pride...
JaneFancher is offline   Reply With Quote
Old 04-08-2010, 03:29 PM   #10
Dellaster
本の虫
Dellaster has a complete set of Star Wars action figures.Dellaster has a complete set of Star Wars action figures.Dellaster has a complete set of Star Wars action figures.Dellaster has a complete set of Star Wars action figures.
 
Dellaster's Avatar
 
Posts: 242
Karma: 344
Join Date: May 2008
Location: USA
Device: Kindle3, DXG, Fire · iPad, iPod
Quote:
Originally Posted by JaneFancher View Post
The advantage for me of going through MobiCreator and Calibre is that it adds the cover as a cover rather than part of the main file, puts in the pointers for the internal ToC and breaks down the one huge file into several smaller files, which makes cleanup in Sigil much easier.

If I import the html directly into Sigil, it's one huge file and makes the poor program chug.
You'd have to put up with the chugging during the process, but Sigil does allow insertion of chapter breaks. Then you go Tools>Split On SGF Chapter Markers to break the file into pieces.

As to the cover, I actually prefer my ebooks to have it included on the first page. It's the only way to see it in its full size and beauty. The icon cover in an ebook reader is too tiny to appreciate. Yeah, it gets bigger in readers on the PC or Mac, but I don't often read at my desktop.

That said, an option in Sigil to set the cover image wouldn't be bad.

Last edited by Dellaster; 04-08-2010 at 03:32 PM.
Dellaster is offline   Reply With Quote
Old 04-08-2010, 09:26 PM   #11
JaneFancher
Zealot
JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.
 
JaneFancher's Avatar
 
Posts: 123
Karma: 496
Join Date: Feb 2009
Location: Spokane, Washington
Device: Kindle2
Okay, all you smart people...there's still a problem with my fonts. I'm taking my html code into Calibre to create basic epub file. Nothing special done, just straight conversion, adding meta and cover. Looks good in Calibre, epub reader and MobiPocket. I bring that epub file up in Sigil and add the fonts and @font code as follows:


@namespace h "http://www.w3.org/1999/xhtml"; (first line in Style.css as constructed by Calibre)

@font-face {
font-family: "Vivaldi", cursive;
font-style: normal;
font-weight: normal;
src:url(../Fonts/Vivaldii.TTF) format(opentype);;
}

@font-face {
font-family: "Trajan Pro", serif;
font-style: normal;
font-weight: normal;
src:url(../Fonts/TrajanPro-Bold.otf) format(opentype);;
}

@font-face {
font-family: "HansonsHand", sans-serif;
font-style: normal;
font-weight: normal;
src:url(../Fonts/HANSON-H.TTF) format(opentype);;
}

@font-face {
font-family: "Schwarzwald", sans-serif;
font-style: normal;
font-weight: normal;
src:url(../Fonts/SCHWARZW.TTF) format(opentype);;
}

@font-face {
font-family: "BankGothic Md BT", sans-serif;
font-style: normal;
font-weight: normal;
src:url(../Fonts/BNKGOTHM.TTF) format(opentype);;
}

@font-face {
font-family: "Brush Script MT Italic", cursive;
font-style: normal;
font-weight: normal;
src:url(../Fonts/BRUSHSCI.TTF) format(opentype);;
}

Returning to Calibre code
.calibre {
display: block;
font-family: "Times New Roman", serif;
font-size: 1em;
font-style: normal;
font-weight: normal;
margin-bottom: 0;
margin-left: 5pt;
margin-right: 5pt;
margin-top: 0;
page-break-before: always;
text-align: justify
}

After the code is added, the file is imported back into Calibre and the default font is suddenly huge. Also, the special fonts don't show.

File looks good, proper default font with special fonts showing, in the other two readers I have.

Anybody?
JaneFancher is offline   Reply With Quote
Old 04-08-2010, 09:52 PM   #12
Dellaster
本の虫
Dellaster has a complete set of Star Wars action figures.Dellaster has a complete set of Star Wars action figures.Dellaster has a complete set of Star Wars action figures.Dellaster has a complete set of Star Wars action figures.
 
Dellaster's Avatar
 
Posts: 242
Karma: 344
Join Date: May 2008
Location: USA
Device: Kindle3, DXG, Fire · iPad, iPod
Jane, see my email. If it's the same issue as the oddly-sized fonts in my dedicated readers we're talking about, the problem is with declaring Times New Roman when it's not embedded. My e-readers don't have that font so they freak out.
Dellaster is offline   Reply With Quote
Old 04-08-2010, 10:42 PM   #13
JaneFancher
Zealot
JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.
 
JaneFancher's Avatar
 
Posts: 123
Karma: 496
Join Date: Feb 2009
Location: Spokane, Washington
Device: Kindle2
Quote:
Originally Posted by Dellaster View Post
Jane, see my email. If it's the same issue as the oddly-sized fonts in my dedicated readers we're talking about, the problem is with declaring Times New Roman when it's not embedded. My e-readers don't have that font so they freak out.
Thanks! Weird.

I thought the reason everyone used TNR was because it was so universal.

But I'm still confused...I thought the reason you put the font=TNR, serif was to have it default to a serif font if TNR wasn't available.

I've tried putting in the changed, but the default font size/weight is still goofy in Calibre's reader.

This is so goofy.
JaneFancher is offline   Reply With Quote
Old 04-08-2010, 10:55 PM   #14
Dellaster
本の虫
Dellaster has a complete set of Star Wars action figures.Dellaster has a complete set of Star Wars action figures.Dellaster has a complete set of Star Wars action figures.Dellaster has a complete set of Star Wars action figures.
 
Dellaster's Avatar
 
Posts: 242
Karma: 344
Join Date: May 2008
Location: USA
Device: Kindle3, DXG, Fire · iPad, iPod
Quote:
Originally Posted by JaneFancher View Post
But I'm still confused...I thought the reason you put the font=TNR, serif was to have it default to a serif font if TNR wasn't available.

I've tried putting in the changed, but the default font size/weight is still goofy in Calibre's reader.

This is so goofy.
I honestly don't know why it wouldn't ignore the TNR and go with serif like a normal browser. The default fonts in my Cybook and iRex are indeed serif. I do know that when I took out those TNR, serif, declarations the ebook no longer had any problems.

The Calibre and embedded fonts thing is probably a separate issue. I have no clue.
Dellaster is offline   Reply With Quote
Old 04-09-2010, 12:24 AM   #15
JaneFancher
Zealot
JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.
 
JaneFancher's Avatar
 
Posts: 123
Karma: 496
Join Date: Feb 2009
Location: Spokane, Washington
Device: Kindle2
Quote:
Originally Posted by Dellaster View Post
I honestly don't know why it wouldn't ignore the TNR and go with serif like a normal browser. The default fonts in my Cybook and iRex are indeed serif. I do know that when I took out those TNR, serif, declarations the ebook no longer had any problems.

The Calibre and embedded fonts thing is probably a separate issue. I have no clue.
I don't think so. I think maybe my initial wordperfect-generated html file is the culprit. I checked out that .calibre2 definition and the handful of paragraphs that were showing properly in calibre didn't have that style code. It was a silly reiteration of the TNR command...which then tried, I suspect, to override the "default" command.

WP's HTML has both the "default" command at the top [I]and[I] a line by line font style command. I don't know why it does that...I suspect it's related to its fonts on and off commands, but I'm betting that's the source of the calibre2 definition and the calibre2 definition is the source of the messed up fonts in your file.

Simply wiping the .calibre2 definition took care of the Calibre problem...on my computer which has TNR in it. I can certain take it out of the body definition as well, but I'm curious to see it it works with that TNR, serif command in there. So...I've sent you yet one more file, if'n ya don't mind taken a peek.
JaneFancher is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Embedding fonts with Sigil? MacEachaidh Sigil 4 08-20-2010 07:16 AM
Embedding fonts JaneFancher Calibre 14 04-10-2010 09:28 PM
Embedding fonts with Sigil and Calibre JaneFancher Calibre 1 04-09-2010 12:35 AM
Embedding fonts AprilHare ePub 6 01-02-2010 11:42 AM
Embedding fonts jash Calibre 2 09-09-2008 05:05 PM


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


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