Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 11-09-2009, 07:38 AM   #1
Haya
Junior Member
Haya began at the beginning.
 
Haya's Avatar
 
Posts: 6
Karma: 10
Join Date: Nov 2009
Location: Spain
Device: cybook opus
Thumbs down How do I insert a font in my epub using Sigil?

How can I put my fonts in the file .sgf?
Haya is offline   Reply With Quote
Old 11-10-2009, 08:21 AM   #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 Haya View Post
How can I put my fonts in the file .sgf?
Font embedding is currently unsupported.

But... if you are really sure you want to do this and are willing to suffer through a few Sigil crashes on close, this is what you should do...

Extract the EPUB file (it's a ZIP archive), not the SGF file. Export to EPUB first if you have to. Now, go to the OEBPS folder in the archive. If there is a "fonts" folder, use that, if there isn't one, create it. Put all the fonts you plan on using in it.

Now open one of your main CSS files and add @font-face style rules referencing those fonts. Reference the font for the body tag etc. I'm assuming you know what you are doing here. If you don't know CSS @font-face, don't even try this.

Zip the META-INF and OEBPS folders back up into an archive.

Load the epub into Sigil. If everything went correctly, the @font-face rules are now referencing font1.ttf, font2.ttf etc... (or .otf, of course). You should also see your fonts used in Book View... most of the time. Qt is buggy here. Italic fonts usually don't show up.

This is all completely unsupported. These are left-over features from back when I was trying to add font embedding, bumped into the Qt bugs related to this, and then stopped. The code hasn't been maintained. It may not still work.

EDIT: If Nokia fixes the Qt bugs causing the problems in Qt 4.6, then this feature will be worked on, and a nice WYSIWYG way of embedding fonts will be added. If they don't it will take a bit longer since I'll have to work on Qt/Webkit myself to fix this.

Yo can track this on the tracker. It's issue 20.

Last edited by Valloric; 11-10-2009 at 08:25 AM.
Valloric is offline   Reply With Quote
Advert
Old 11-10-2009, 09:47 AM   #3
Haya
Junior Member
Haya began at the beginning.
 
Haya's Avatar
 
Posts: 6
Karma: 10
Join Date: Nov 2009
Location: Spain
Device: cybook opus
Ok
Maybe it is better
under Sigil
to put tags empty in the source and
after as the last work open the epub like zip and add
fonts and change the css

thanks for your work.
:-)
Haya is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sigil + embedded font variants troymc Sigil 6 10-17-2012 11:00 AM
Sigil, the ePub editor Valloric Sigil 321 02-16-2011 12:13 PM
Sigil Font crutledge Sigil 6 05-31-2010 10:35 AM
Why is Sigil changing the font size? djloewen Sigil 6 12-25-2009 09:41 AM
Sigil ePub editor - where is it? Alexander Turcic ePub 3 08-04-2009 05:55 PM


All times are GMT -4. The time now is 06:43 PM.


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