Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 11-01-2022, 10:33 AM   #1
tatagi
Connoisseur
tatagi began at the beginning.
 
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.
tatagi is offline   Reply With Quote
Old 11-01-2022, 01:24 PM   #2
Quoth
the rook, bossing Never.
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: 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.
Quoth is offline   Reply With Quote
Advert
Old 11-01-2022, 05:14 PM   #3
phillipgessert
Addict
phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.
 
phillipgessert's Avatar
 
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?
phillipgessert is offline   Reply With Quote
Old 11-01-2022, 07:15 PM   #4
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by Quoth View Post
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.
It is possible to add CSS to an epub which points to a font which is sideloaded on the device rather than embedded. But it does depend on which device/reading app you're using.

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.
jackie_w is offline   Reply With Quote
Old 11-01-2022, 07:35 PM   #5
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Quote:
Originally Posted by jackie_w View Post
.../... I believe it also works in KOReader (at least on a Kobo or in Android) without adding any CSS @font-faces at all.

.../...
in KOReader, it also works with Kindle PW3 and probably many others too.
roger64 is offline   Reply With Quote
Advert
Old 11-01-2022, 07:50 PM   #6
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by roger64 View Post
in KOReader, it also works with Kindle PW3 and probably many others too.
I thought it probably would, thanks for confirming. I've only used KOReader on Kobo and Android.
jackie_w is offline   Reply With Quote
Old 11-01-2022, 08:02 PM   #7
tatagi
Connoisseur
tatagi began at the beginning.
 
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.
tatagi is offline   Reply With Quote
Old 11-01-2022, 09:39 PM   #8
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
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.
JSWolf is offline   Reply With Quote
Old 11-02-2022, 07:36 AM   #9
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
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.
Turtle91 is offline   Reply With Quote
Old 11-02-2022, 08:43 AM   #10
tatagi
Connoisseur
tatagi began at the beginning.
 
Posts: 52
Karma: 10
Join Date: Oct 2022
Device: none
Quote:
Originally Posted by JSWolf View Post
@tatagi try subsetting the fonts with Calibre. That will reduce the size of the fonts being used and will delete any not being used.
Quote:
Originally Posted by Turtle91 View Post
If you are using Sigil there is a font sub-setting plug-in.
problem is sub-setting won't help a lot because most of the glyphs - 11,172 in total - are actually in use.

can you recommend any ebook viewer other than sumatra that supports multiple tabs and is not too heavy?
tatagi is offline   Reply With Quote
Old 11-02-2022, 08:59 AM   #11
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
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.
Turtle91 is offline   Reply With Quote
Old 11-02-2022, 02:10 PM   #12
Quoth
the rook, bossing Never.
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: 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.
Quoth is offline   Reply With Quote
Old 11-04-2022, 12:55 AM   #13
bookman156
Addict
bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.
 
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.
bookman156 is offline   Reply With Quote
Old 11-04-2022, 07:04 AM   #14
Quoth
the rook, bossing Never.
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: 11,343
Karma: 85874895
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Quote:
Originally Posted by bookman156 View Post
You can't reference a font folder outside of an epub can you? Never tried.
AFAIK you can only have full URLs (not relative) that are simply internet links. Any relative path only works inside the epub.
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.
Quoth is offline   Reply With Quote
Old 11-04-2022, 07:32 AM   #15
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
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
Quote:
Originally Posted by tatagi View Post
problem is sub-setting won't help a lot because most of the glyphs - 11,172 in total - are actually in use.
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.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 12:31 PM.


MobileRead.com is a privately owned, operated and funded community.