View Full Version : how do I UN-font an epub?


affa
04-20-2011, 03:02 AM
I'm nearly finished my first epub and it's shaping up great, but I just did a validation on it and I'm getting
'This resource is reachable but not present...' errors for the fonts.

Now, I went from Indesign CS4 to EPUB, and I intentionally did NOT embed fonts and would like to rely on each readers generic fonts.

My question is simple -- I have a css that's referencing fonts that aren't embedded. What do I do to remedy this? (I don't know css, so I need a dumbed down yet technical answer).

I've found many great resources on how to embed fonts into an Epub... but haven't found a tutorial (yet) on how NOT to. Any help or pointers in the right direction would be appreciated.

mrmls
04-20-2011, 03:41 AM
Just remove that CSS that defines embedded fonts.
If no CSS for fonts are defined, then device's default fonts are used.

It might vary from device to device, but if embedded fonts are not found, default will be used without any warning. So, you can actually leave that CSS, but, of course, better to remove for valid epub.

affa
04-20-2011, 08:08 AM
Thank you for the prompt reply... so in the rare case someone has those specific fonts, it would render properly. Interesting. Don't think it's worth keeping them declared, though, since these fonts are relatively rare.

Now, sorry to be dense, I'm just not sure I understand what to delete yet.

Looking at the CSS, I see several declarations that look like:

@font-face {
font-family: "Century Schoolbook";
font-style: normal;
font-weight: normal;
src:local(CenturySchoolbook);
}

then, after that, there are what I recognize as my styles (from indesign), such as:

p.front-matter {
font-family: "Century Schoolbook";
line-height: 1.09em;
font-size: 0.92em;
margin-bottom: 0.00em;
margin-top: 0.00em;
text-indent: 0.00em;
margin-right: 0.00em;
margin-left: 0.00em;
text-align: left;
font-weight: normal;
font-style: normal;
color: rgb(0,0,0);
}

Should I be deleting everything? I'm guessing I still want my styles to have some impact, correct?

Would simply deleting the 'font' name in the style do the job? So, for this case:

p.front-matter {
DELETE JUST THIS LINE font-family: "Century Schoolbook";
line-height: 1.09em;
font-size: 0.92em;
margin-bottom: 0.00em;
margin-top: 0.00em;
text-indent: 0.00em;
margin-right: 0.00em;
margin-left: 0.00em;
text-align: left;
font-weight: normal;
font-style: normal;
color: rgb(0,0,0);
}

Should I be deleting/modifying the "font-face" section? If my spidey sense is on point, it looks like the font-face section is simply naming and specifying the font for future reference, so can be safely deleted since i'm deleting the references.

But then it would seem deleting the css wholesale would have unintended consequences (for example, my italics are based on styles). But exactly to delete? I'd think if I simply deleted the font line, then the rest of the style would impact the generic font (to some degree, based on reader)... but i'd love some confirmation that's the right way to go about it.

Jellby
04-20-2011, 09:03 AM
If you delete all @font-face rules, and all font-family references to them, it should be safe.

affa
04-20-2011, 12:50 PM
you rock, thank you. will give it a whirl today.