View Single Post
Old 11-27-2021, 06:21 AM   #1
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,420
Karma: 107078855
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Font properties: CSS version mismatch?

Is there a slight mismatch between conversion of docx styles to font CSS and what is needed?
The CSS below is technically correct for some versions of CSS, but gives check errors. The 2nd simpler version gives no errors and works as expected on Sony, Binatone, Nook, Kobo, Apps and conversion to KF8 or KFX by Amazon or locally.


The conversion from docx to epub gives:
Code:
@font-face {
    font-family: "Georgia";
    panose-1: 2 4 5 2 5 4 5 2 3 3;
    src: url(fonts/Georgia.ttf)
    }
@font-face {
    font-family: "Georgia";
    panose-1: 2 4 8 2 5 4 5 2 2 3;
    src: url(fonts/Georgia-Bold.ttf);
    font-weight: bold
    }
@font-face {
    font-family: "Georgia";
    panose-1: 2 4 5 2 5 4 5 9 3 3;
    src: url(fonts/Georgia-Italic.ttf);
    font-style: italic
    }
@font-face {
    font-family: "Gaelic";
    font-weight: 5;
    font-style: normal;
    font-stretch: normal;
    src: url(fonts/Gaelic.ttf)
    }
It's dubious if anything anywhere uses the panose-1 property. It's been in and out and in on CSS version spec. Gives and error under the ladybug book check tool.
A numeric "font-weight: 5" may or not cause an ereader issue. But the check thinks it's an error. It should be "font-weight: normal". Gaelic is the only font I use that generates a number on conversion instead of description strings.

Editing manually removes errors and works fine on all apps an ereaders as expected and also resulting Amazon downloads (KF8 or KFX) are as expected from the epub upload, as is local dual mobi viewed in Publisher mode (KK3 & PW3):
Code:
@font-face {
    font-family: "Georgia";
    src: url(fonts/Georgia.ttf)
    }
@font-face {
    font-family: "Georgia";
    src: url(fonts/Georgia-Bold.ttf);
    font-weight: bold
    }
@font-face {
    font-family: "Georgia";
    src: url(fonts/Georgia-Italic.ttf);
    font-style: italic
    }
@font-face {
    font-family: "Gaelic";
    font-weight: normal;
    font-style: normal;
    font-stretch: normal;
    src: url(fonts/Gaelic.ttf)
    }
The only ereader I have where it's all irrelevant is the DXG as it's a dumber than KK3 version of KF7 rendering, but fonts do mostly correctly be Serif, Sans or Monospace with either normal, bold, italic or bold italic.
Quoth is offline   Reply With Quote