View Single Post
Old 10-06-2014, 03:26 AM   #91
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Quote:
Originally Posted by JSWolf View Post
I just tried this using Bluefire Reader and it didn't work. I overrode the default embedded font and I did not see BlankFont show up in red at all.
IIRC, Bluefire uses a sane, non-evil approach to font overrides, as opposed to the truly defective ones that the above code is designed to catch—that is to say, if you specify a style on an element that includes a font, Bluefire honors it. For my purposes, I was okay with a reader overriding the body font, so long as it didn't override any of the decorative fonts used for non-body content.

If you want something that catches *every* instance of a font override, you have to approach it similarly, but with different CSS:
  • Set the base font for an entire HTML file to blankfont.
  • Include a paragraph of explanatory text, and give that paragraph a font override (with !important, in the inline style, which should give it absolute precedence over everything else).
  • Follow it with a paragraph that has no font specified.

A conforming reader that isn't overriding the font will display an empty paragraph instead of that second paragraph. A reader that is overriding the font in any way will display the contents.
dgatwood is offline   Reply With Quote