11-01-2022, 10:33 AM | #1 |
Connoisseur
Posts: 52
Karma: 10
Join Date: Oct 2022
Device: none
|
Declaring which system font to use for epubs, possible?
I always think that embedding fonts for each and every one of epubs I have is waste of storage space.
And default font the viewer app is using is not that easy on eyes. Now I wonder. Is it possible for one to save the fonts outside epub, maybe somewhere in the nearby folder named "fonts", and put some lines in the css or anywhere in epubs, manifesting that I use those fonts in that directory for the contents. Is this technically possible or making no sense at all? thank you. Last edited by tatagi; 11-01-2022 at 10:36 AM. |
11-01-2022, 01:24 PM | #2 |
the rook, bossing Never.
Posts: 11,343
Karma: 85874895
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
You can specify a font in CSS and not embed it. You can't use CSS to say where it is if it's not embedded.
A referenced font in CSS but not embedded will work if "Publisher" font is selected and the font is already on the ereader. The kobo and some kindles allow adding fonts to the system. I've never done that, so I can't advise, but the font adding rules are specific or it doesn't work. Asian fonts might add a lot of storage per ebook, but a subsetted Latin-Roman (or other Western), Hebrew, Arabic, Greek or Cyrillic font embedded won't take much space. Calibre conversion (or Editor) can subset font(s). I usually embed Georgia, but it's likely not exactly the same Georgia as on a Kobo. Not all ereaders have it. The older Kindles and many apps ignore embedded fonts. Older kindles and some apps will only display fonts installed by Amazon Firmware or the App programmer. |
Advert | |
|
11-01-2022, 05:14 PM | #3 |
Addict
Posts: 311
Karma: 3196258
Join Date: Oct 2015
Location: Madison, WI
Device: Kindle 5th Gen
|
Sounds like you're talking about adding to a given reader's available inbuilt/system fonts, and that would be more of an app configuration than an ebook one. I doubt many support that. I want to say Marvin does?
|
11-01-2022, 07:15 PM | #4 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
For example, it can be made to work on a Kobo for an epub but, (as of quite recently), not a kepub. I believe it also works in KOReader (at least on a Kobo or in Android) without adding any CSS @font-faces at all. The necessary CSS is unlikely to ever be seen in retail books but you can add it yourself for your own books. I've been doing it for years. Last edited by jackie_w; 11-01-2022 at 07:18 PM. |
|
11-01-2022, 07:35 PM | #5 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
|
Advert | |
|
11-01-2022, 07:50 PM | #6 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
|
11-01-2022, 08:02 PM | #7 |
Connoisseur
Posts: 52
Karma: 10
Join Date: Oct 2022
Device: none
|
Thank you all for the replies.
most of my ebooks are written in asian language with hell of a lot of glyphs, so the font size is the real issue. with 4-5 fonts alone it already exceeds 20MBs. on a side note, I use Windows 10 and Sumatrapdf app for reading books. so my plan is this: 1. save most frequently used fonts in specific folder named, say "epubfonts" 2. remove all embedded fonts in epubs 3. specify the font in css 4. do 2 and 3 in all epub books I am trying to read in that font. the tricky part is 3, because in this case I have to specify the url of fonts outisde epub file. for example, I put all font files in "C:\users\username\document\epubfonts\ and all ebooks in "C:\users\username\document\ebooks\ then what should the relative path be for the @font-face? for example, the url for embedded font is something like Code:
@font-face { font-family: "fontname"; src: url(../Fonts/fontname.ttf); } Last edited by tatagi; 11-01-2022 at 08:05 PM. |
11-01-2022, 09:39 PM | #8 |
Resident Curmudgeon
Posts: 74,368
Karma: 129333690
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
@tatagi try subsetting the fonts with Calibre. That will reduce the size of the fonts being used and will delete any not being used.
|
11-02-2022, 07:36 AM | #9 |
A Hairy Wizard
Posts: 3,115
Karma: 18727091
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
If you are using Sigil there is a font sub-setting plug-in.
|
11-02-2022, 08:43 AM | #10 | ||
Connoisseur
Posts: 52
Karma: 10
Join Date: Oct 2022
Device: none
|
Quote:
Quote:
can you recommend any ebook viewer other than sumatra that supports multiple tabs and is not too heavy? |
||
11-02-2022, 08:59 AM | #11 |
A Hairy Wizard
Posts: 3,115
Karma: 18727091
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
I only edit ePubs in my windows machine. Both Calibre and Sigil have viewers so you can see the results.
I just did a google search for best windows epub reader with a few results. You’ll have to decide which one satisfies your requirements best. |
11-02-2022, 02:10 PM | #12 |
the rook, bossing Never.
Posts: 11,343
Karma: 85874895
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Calibre viewer can run standalone.
|
11-04-2022, 12:55 AM | #13 |
Addict
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
You can't reference a font folder outside of an epub can you? Never tried.
Have you tried simply removing the Asian fonts from the epub and just specifying either serif or sans-serif as font family? The epub should pick up the Chinese or whatever font from the system. If you only have, say Noto Sans CJK TC, and that has the characters you need, then that should be what you see without need of specifying a path. There is no need to embed an Asian font, and if you want a particular one just make sure that's the only one you have on your PC (or see whether you like the one that is automatically selected). You could also try specifying font-names in the font-family list that you have in your local fonts folder in Windows and see whether they get picked up, but if you're satisfied with the Asian fonts on webpages then that should be what you see in an epub simply by removing the embedded fonts and without specifying anything save perhaps serif or sans-serif. Last edited by bookman156; 11-04-2022 at 02:17 AM. |
11-04-2022, 07:04 AM | #14 | |
the rook, bossing Never.
Posts: 11,343
Karma: 85874895
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Quote:
I don't believe you can explicitly reference anything on the ereader (or host or an app). Any referenced fonts have to either have a reference inside the epub (a zip file) or no path, in which case the App, OS or ereader uses any matching font description in any location it can use automatically. Some Apps ignore font CSS. An ereader may fall back to another font if the reference one is neither embedded, nor "known" to the system. Not all ereaders can have user added fonts. If supported there are rules. |
|
11-04-2022, 07:32 AM | #15 |
Resident Curmudgeon
Posts: 74,368
Karma: 129333690
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Of course it will help. For example, a font is embedded. You have normal, bold, italic, and bold italic. Bold italic is not used so it gets deleted. The others get reduced in size. If these glyphs are not used in bold and italic then those versions get reduced even more then normal.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Declaring Different Versions of One Font | Rand Brittain | ePub | 3 | 10-02-2020 06:15 PM |
Forma Changing system font | bearthang | Kobo Reader | 17 | 05-09-2020 12:38 PM |
Aura H2O Font size mismatch (downloaded epubs via Calibre vs. Kobo epubs & articles) | Oolong | Kobo Reader | 36 | 01-25-2019 06:00 AM |
Changing default system font | haidinhtuan | Kobo Developer's Corner | 6 | 06-06-2017 04:25 AM |
Touch How can I change system font? | AlexViean | Kobo Developer's Corner | 12 | 06-06-2017 04:14 AM |