12-08-2024, 04:38 AM | #1 |
Zealot
Posts: 124
Karma: 10
Join Date: Feb 2016
Device: iPad mini 4
|
fake error on embed fonts
calibre editor show some "errors" about embed fonts
show error with font-family: "Charter"; Unexpected missing generic font family (font-family-no-missing-generic-family-keyword). See detailed description suggest and here the link to which i'm referring https://stylelint.io/user-guide/rule...family-keyword) but no error with font-family: "Charter", serif; but on my iPad mini no difference with or without serif; so fake error for me ... i hope the dev can add an option for future next rel to hide or ignore error like this. |
12-08-2024, 05:53 AM | #2 |
Well trained by Cats
Posts: 30,572
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
It is not 'Fake'. It is just a warning that if your system does not have the specified font, you will get odd results without a fallback.
I can't remember seeing that with an embedded font and no fallback called out. |
Advert | |
|
12-08-2024, 09:26 AM | #3 |
Zealot
Posts: 124
Karma: 10
Join Date: Feb 2016
Device: iPad mini 4
|
yes i know, just a warning
but this warning it's about all class with same font. so lot of class, lot of warning (or error) on check book. and this for me, is with all various fonts embed on my ebooks i repeat, i hope Kovid Goyal add an option to ignore this warning/error on future release (from old calibre 3.95 version, used on my old pc with win 7, never see this warning, and all book displayed fine on my ipad) Last edited by larysa; 12-08-2024 at 09:30 AM. |
12-08-2024, 09:58 AM | #4 |
creator of calibre
Posts: 44,764
Karma: 24967300
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No its a perfectly legitimate warning. You should always specify a fallback family for an embedded font.. That way the user agent can pick a better fallback if for whatever reason it is unable to use the embedded or referenced font.
|
12-08-2024, 11:49 AM | #5 |
Zealot
Posts: 124
Karma: 10
Join Date: Feb 2016
Device: iPad mini 4
|
ye, understand. but i just wish an option to ignore warnings
and another way to avoid errors is var(--font-family-common); this option can't load family font (like serif) but calibre don't show warning |
Advert | |
|
12-09-2024, 03:52 AM | #6 |
Zealot
Posts: 124
Karma: 10
Join Date: Feb 2016
Device: iPad mini 4
|
what i mean is that with the code var(--font-family-common); no replacement font is specified, but calibre does not detect errors. why?
|
12-09-2024, 09:52 AM | #7 |
Resident Curmudgeon
Posts: 77,399
Karma: 139110232
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Is this eBook for you or one that you plan to sell? Because if it is one you plan to sell, your var won't work in a lot of cases.
|
12-09-2024, 11:13 AM | #8 |
creator of calibre
Posts: 44,764
Karma: 24967300
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Because calibre's error checking is not out to catch every possible way you can decide to shoot yourself in the foot, just common mistakes. Feel free to send a patch to the stylelint project to add a rule for that if this bothers you.
|
12-09-2024, 01:42 PM | #9 |
Zealot
Posts: 124
Karma: 10
Join Date: Feb 2016
Device: iPad mini 4
|
bother ? oh no mate, no problem for me
and Jon the ebook it's just for me. i'm private user, no selling. I'm just trying a code to not show error on calibre check book. but maybe i could share my book version, so maybe better to use font-family: "Charter", serif; code |
12-09-2024, 02:03 PM | #10 | |
Resident Curmudgeon
Posts: 77,399
Karma: 139110232
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
12-09-2024, 07:09 PM | #11 | ||
Reading till the spring
Posts: 12,700
Karma: 96948653
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Quote:
Ebooks use HTML and CSS, but the specs don't support everything a browser supports. The actual eink ereaders also support less of the specs than Apps do, and they vary in support too. Quote:
This applies to epub (all versions), azw3(KF8) and KFX. It doesn't apply to old mobi as that doesn't have CSS. Other old formats such as LRF and especially older formats for Palm and CE also are very limited. Mobi can just about do a generic Sans, Serif and Monospace, each in normal, italic, bold and bold italic. I think LRF may not do true italic, but use Oblque. An Oblique rendering is simply the font angled. True italic is the same family, but an actual separate font and some letters may use a different shape. Similarly some ancient systems simply repeat the normal font offset to make it bold. Real bold is a separate font. Cursive is not italic, though some cursive fonts originated as Italic. Some fonts representing older writings may have Serif, Cursive or Fantasy as the fall back depending on their style. Some fonts should NEVER have "bold" applied, so if they are in an <h tag you need CSS to set it to normal as usually any <h tag with no css is rendered bold. See https://www.w3schools.com/Css/css_font.asp It's a real error not to have one of the 5 fallback font families specified. Printed books are high resolution, so except for children and some text books they will be Serif. Stuff for web page, computer screens, TV screens etc is traditionally low resolution, so use Sans. An ebook screen (eink or phone/tablet app) is typically 2 to 4 times the resolution of traditional laptops and monitors and can be about 1/2 the resolution of paper. So Serif is common, but not all fonts that work on paper will be suitable. Last edited by Quoth; 12-09-2024 at 07:15 PM. |
||
12-09-2024, 07:21 PM | #12 | |
Reading till the spring
Posts: 12,700
Karma: 96948653
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Quote:
See any paperback novel. |
|
12-09-2024, 10:04 PM | #13 | |
Grand Sorcerer
Posts: 6,813
Karma: 87300001
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Quote:
|
|
12-10-2024, 04:56 AM | #14 | |
Zealot
Posts: 124
Karma: 10
Join Date: Feb 2016
Device: iPad mini 4
|
Quote:
so i downloaded a generic Charter font from the web, built into my book and now my ipad no longer "sees" the font flaw like the original one, but uses an appropriate distance between the L and the h, as it should be and as ipad does with all the other default built-in fonts but embed font with calibre, with font-family: "Charter"; only calibre show a warning, this is why i've start this thread |
|
12-10-2024, 05:09 AM | #15 | |
Resident Curmudgeon
Posts: 77,399
Karma: 139110232
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
To Embed Fonts or Not to Embed Fonts | keress | ePub | 25 | 03-09-2020 09:46 PM |
Can it embed fonts? | chalimac | Kobo Reader | 1 | 06-27-2017 06:46 PM |
Embed fonts in mobi | NIRC | Kindle Formats | 34 | 02-25-2016 11:59 PM |
Is it possible to really embed fonts yet? | LaurelRusswurm | ePub | 25 | 11-17-2011 11:25 PM |
Is it possible to UN embed fonts? | lmronan | Sigil | 14 | 06-04-2010 10:26 AM |