View Single Post
Old 02-04-2015, 01:49 AM   #148
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 dgatwood View Post
I made my CSS follow those rules. It still gets all the fonts stripped. I tried ensuring that all font styles appear only in the KF8 slice by wrapping them in an @media query. I even tried ripping out every fallback font that wasn't included in the EPUB book.
Moreover, I removed all CSS except for the CSS for the body tag and the CSS for the main body font, and it still failed.

Code:
body {
	font-family: "DG Didot", "New Century Schoolbook",
		"Century Schoolbook", "Bookman Old Style", Bookman, Serif;
}

@font-face {
  font-family: 'DG Didot';
  font-style: normal;
  font-weight: normal;
  font-kerning: normal;

  src: url('fonts/DGDidot/DGDidot-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'DG Didot';
  font-style: normal;
  font-weight: bold;
  font-kerning: normal;

  src: url('fonts/DGDidot/DGDidot-Bold.ttf') format('truetype');
}

@font-face {
  font-family: 'DG Didot';
  font-style: italic;
  font-weight: normal;
  font-kerning: normal;

  src: url('fonts/DGDidot/DGDidot-Italic.ttf') format('truetype');
}

@font-face {
  font-family: 'DG Didot';
  font-style: italic;
  font-weight: bold;
  font-kerning: normal;

  src: url('fonts/DGDidot/DGDidot-BoldItalic.ttf') format('truetype');
}

But bizarrely, removing the fallback fonts:

Code:
	font-family: "DG Didot", serif;
seems to have fixed the font stripping problem. However, I tried that before, and it didn't work. The only other significant change I've made since that prior attempt was changing:

Code:
  src: url('fonts/DGDidot/DGDidot-BoldItalic.ttf') format('opentype');
(which was technically wrong, but completely tolerated by every reader I tried) to:

Code:
  src: url('fonts/DGDidot/DGDidot-BoldItalic.ttf') format('truetype');
Neither change on its own was sufficient.

I'll know in a few minutes if these two fixes plus your four rules are sufficient or just necessary.
dgatwood is offline   Reply With Quote