View Single Post
Old 12-27-2011, 12:31 PM   #99
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by jagwar View Post
Is there a way to tell Calibre to always add that code to extra css or do I have to do it manually?
As long as you are planning to do a Calibre conversion to create your epub you can copy the @font-face statements into the Preferences - Common Options - Look&Feel - ExtraCSS box. Then Calibre will use them during every epub conversion.
Note: For some reason Calibre copies them into every html file inside the epub rather than just once into the .css file. However, the result should be the same on your Sony.

If you also want to add some control for margins, widows/orphans, line-height (or any other css attributes which take your fancy), then you could also consider adding some body {... ...} css into the ExtraCSS box, as shown in JSWolf's example in post #91.

If you are not planning to do a Calibre conversion then you need to manually copy the @font-face statements into the .css file inside the epub.

Caveat: ebooks are created in many and various ways by people with varying abilities. Therefore you may come across some epubs which don't work with this simple font customisation. This is because the existing css in the epub is overriding your changes. These badly behaved epubs can always be fixed manually but it will require you to examine the css to see what is going wrong. Consequently, the more you learn about html/css the easier you will find it to knock a recalcitrant epub into shape.
jackie_w is offline   Reply With Quote