View Single Post
Old 08-20-2010, 01:55 AM   #18
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
Full sympathy!

Basically, you'll have to take a quick course in programming to do it, but only in the code for fonts. It's not hard...just be aware that every letter, comma and colon is significant.

Are you dealing with an epub file with a separate style.CSS file? (In Sigil, this will appear in the folder "style" right under the "html" folder and above the "fonts" folder.)

Personally, I take a really clean html file, complete with fonts, into Calibre and let it make the epub file. It creates a nice style.css file with all the font calls identified. Once you have that, open it in Sigil and find those "calls" in the style.css file. When you put your code into the very top of the Style.css file, you'll have to use exactly the same language (font name and generic name) as appears in those "calls".

You might have to copy your fonts into a folder other than your windows "fonts" folder, then add those fonts to the epub font folder by right clicking on the folder.

Check out the code in my post #11 of this thread. That @font code (modified for your fonts natch) goes right at the top of the style.css file, just under that first line as shows in the post...or something very similar, and just before the first style code (in the case of a Calibre-generated epub, that will be the .calibre paragraph)

You need to make sure to give a "generic" font type (serif, sans-serif) along with the special font in case the reader doesn't support the embedded fonts.

(Note: The .calibre# numbers are generated by calibre as it encounters new stylistic forms. The cleaner and more consistent your html file, the fewer of these .calibre# codes and so the shorter your style.css file. Basically what you're doing with that @font command is telling the files where to find the font in question when the .calibre# style code calls for it.)

Make sure you spell the name of the font exactly as it appears in the .calibre code and the font file exactly as it appears in the fonts folder, caps matter. Oh...and take out any spaces in the file name, as I recall.

Hope this helps. It can be very futsy and until you get it just right, it won't show in the file.

Oh...and if you're making files to sell, you've got to be very careful about what fonts you use. Fonts can't be copyrighted, but the digitalization of them can be. You need to search around for fonts that allow for distribution.

Good luck!

Last edited by JaneFancher; 08-20-2010 at 01:57 AM.
JaneFancher is offline   Reply With Quote