Quote:
Originally Posted by jackie_w
@notsure
Try this:
Reimport the original epub, i.e. before you did any conversions.
Convert using all the ExtraCSS you had before, but replace
Code:
body {
font-family: "Fontin", serif;
}
with
Code:
body.calibre {
font-family: "Fontin", serif;
}
|
I'm having a similar problem where i can't get the specified fonts in Extra CSS to work.
This is probably because of the html output by Book Designer. The converted epub always retains the original font, in this case GeorgiaEInk15.
There is no simple <body> tag in this original html file, and I can't find a similar way to make the Extra CSS work. You can see in this snippet of html that there is a single line that begins with "<body" followed by several other items including the font-family. A single "</body>" tag appears at the end of the book.
So I'd like to know if there is a way to replace:
Code:
body {
font-family: AmasisMT;
}
with something that will work.
Original html snippet:
Code:
---
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Unknown</title>
<meta content="http://www.w3.org/1999/xhtml; charset=utf-8" http-equiv="Content-Type"/>
</head>
<body bgcolor="#ffffff" style="FONT-WEIGHT:normal; FONT-SIZE:small; MARGIN-BOTTOM:245px; LINE-HEIGHT:normal; FONT-FAMILY:GeorgiaEInk15" text="#000000">
<h2 align="center" id="BookTitle"><font color="#b90000"><b>BOOK TITLE</b></font>
</h2>
<div align="justify"> </div>
<div align="center"><b>BOOK TITLE #1</b></div>
<div align="justify"> </div>
<div align="justify"> </div>
<div align="center">by</div>
<div align="justify"> </div>
<div align="justify"> </div>
<h2 align="center" id="BookAuthor"><font color="#ff0000"><b>JOHN SMITH</b></font>
</h2>
Yes, I can run the Calibre conversion and then use Tweak Book to manually change the font name in stylesheet.css, but that is cumbersome and the tweaked epub file retains the original (now incorrect) font name in a zillion places.