Search code examples
cssfontsfont-faceepub

Embedding font stops italics from working, how was it working initially?


For my own use, I was making an epub version of this free novella http://fluffandsmoke-blog.tumblr.com

The font used for this is "Belleza". It's a free font, but it only comes in "Regular".

I found, with the font installed on my computer, my epub will quite happily display text in an italic version of the font at appropriate places. Even though there is only "Belleza-Regular" installed.

As soon as I embed the font into the epub file, italic text is no longer italic (I am declaring the font with an @font-face declaration including "font-style: italic;") I'm pretty sure the problem is the lack of an italic version for this font.

So I'm baffled as to how it's able to do italics without the font embedded. Is it a feature of Windows to do fake-italics in some situations?


Solution

  • The browser simply fakes bold or italic styles of a font. If the actual font-family does not include a bold or italic font, but the text is styled as bold or italic, then the browser sort of creates that style for us to see.

    For more detail on this: https://alistapart.com/article/say-no-to-faux-bold