Quote:
Originally Posted by kiwidude
I'm still wrapping my head around the font-face in every file thing  . So you are saying calibre does it because they "could" be different in each file, since each html file "might" link to a different css file in the original? But in the situation where you have a single css file, and the font-face declarations are contained within it, there is no need to replicate them into the html files, is that correct?
|
If the font face declarations for all html files are the same, then you can put them into the single css file. But note that this is almost never the case. For example, the cover html page and the jacket page typically do not share font-face declarations with the rest of the book, since they are inserted afterwards. If the font face declarations really bother you, the solution is to put them into eternal stylesheets, and link to them from each html file. Every html file that has a different set of font-faces will link to a different stylesheet. I've never bothered to do this, as IMO it isn't worth the effort, but a patch is welcome.
Also, as a quick and dirty fix, you can convert the epub to kf8 and then convert the kf8 back to epub. (KF8 requires all inline style info to be extracted into stylesheets, so calibre does it automatically in that case.
Quote:
As for the covers, thx for the info Kovid. I wasn't sure if there was some special reason why epubFixer goes the SVG route. If I can avoid that (I don't really know the "why" of SVG in an epub) then all the better.
|
SVG allows you to specify that the cover be fullscreen. That is why calibre (and presumably, epub fixer) use it.
Quote:
So as I understand it the potential issues are:
- always inserting a cover will sometimes duplicate an existing cover.
- choosing to replace an existing cover is not good sometimes either, since as you say some epubs mark a content page as the cover.
- handling various issues of naming conflicts of a titlepage html, cover.jpg, manifest ids etc
- setting the guide to point to the new cover
|
You will also have to replace/insert the <meta name="cover"> tag in the opf. And note that the id of the cover in the manifest must be "cover" and nothing else (which means you have to handle the case fo the manifest having something else with id+'cover" already) and it must be close to the top of the manifest, otherwise it will not work in some devices. And the <meta name="cover"> tag must have the name attribute before the content attribute.