Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 10-28-2022, 10:25 PM   #1
tatagi
Connoisseur
tatagi began at the beginning.
 
Posts: 52
Karma: 10
Join Date: Oct 2022
Device: none
Is there any problem with removing fonts folder?

I want to delete fonts folder including all fonts in it to reduce each epub files size where font files(mostly ttf format) take up most of the capacity.
(fyi, there're more than 17,000 glyphs in my language area, so font size is gigantic compared to common latin alphabet font)

since I have thousands of ebooks in my collection, it is too time consuming to edit css that font related tags are referenced to(like @font-face or any others), so this is what I am thinking to do.

1. rename filename.epub to filename.zip
2. open it up and delete fonts folder in there.
3. recompress it and rename it back to filename.epub
4. file size shrinks from 10-20MBs to shining 1MBs, voila!

I tested some files myself and for now it works without a problem(at least I think)

so the question is this: Can I safely leave style.css alone and just remove fonts folder? my viewer(sumatrapdf) opens it as normally as other files.

I am not a publicator or author, but a peasant who loves reading

thank you a ton!
tatagi is offline   Reply With Quote
Old 10-29-2022, 09:35 AM   #2
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,222
Karma: 19000635
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
If you run ePubcheck on an ePub with missing resource files it will give an error.

I don't know of any reader's/apps that run ePubcheck on their own so you shouldn't have any problem if you are using these ePubs on your own device for your own personal use. However, some (most?) publication intake processes will reject an ePub that does not pass ePubcheck.
Turtle91 is offline   Reply With Quote
Advert
Old 10-29-2022, 10:17 AM   #3
Ned
Ebook reader
Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.Ned ought to be getting tired of karma fortunes by now.
 
Ned's Avatar
 
Posts: 389
Karma: 5899335
Join Date: Oct 2008
Location: York, England
Device: Kobo Aura H2O (ed 2, v1), Kobo Forma, Kobo Libra 2
I routinely edit out the fonts folders if any are included because I use my own fonts and it saves space.
If all you're doing is reading the epub, I can't see any problem. I never have had.
Ned is offline   Reply With Quote
Old 10-29-2022, 12:40 PM   #4
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by tatagi View Post
I want to delete fonts folder including all fonts in it to reduce each epub files size where font files(mostly ttf format) take up most of the capacity.
If you're a Calibre user, you can remove embedded fonts with the Modify Epub plugin.
Doitsu is offline   Reply With Quote
Old 10-29-2022, 06:07 PM   #5
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,557
Karma: 14325282
Join Date: Nov 2019
Device: none
Quote:
Originally Posted by Doitsu View Post
If you're a Calibre user, you can remove embedded fonts with the Modify Epub plugin.
That does remove the physical font files but in the css it leaves the font-family referencing those fonts. Can that css cause any problems?
hobnail is offline   Reply With Quote
Advert
Old 10-29-2022, 06:23 PM   #6
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: 76,402
Karma: 136466962
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
One thing that can be done that won't cause any problems is to subset the fonts. That removes any font files not being used and reduces the size of the fonts being used. It's the easiest solution that doesn't require edited each ePub that has embedded fonts.

It can be done by selecting all the eBooks in the library and using Polish to subset.
JSWolf is offline   Reply With Quote
Old 10-30-2022, 07:05 AM   #7
tatagi
Connoisseur
tatagi began at the beginning.
 
Posts: 52
Karma: 10
Join Date: Oct 2022
Device: none
thank you all for the replies

thank you all for the replies.
I am messing around with epubs to get a result I've expected with different settings.

a few more questions would be:

1. are there any viewers available on Windows that support multiple default fonts for different elements? e.g times new roman for header, segoi ui for body etc., of course with the right manifestation.

2. any editor that shows any missing or broken glyphs between with or without embedded fonts? so I can detect if removing the embedded fonts will cause the issues and where they are.
tatagi is offline   Reply With Quote
Old 10-30-2022, 07:09 AM   #8
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by hobnail View Post
That does remove the physical font files but in the css it leaves the font-family referencing those fonts. Can that css cause any problems?
That depends on the rendering engine and the CSS file. CSS files in commercial books usually contain fallback font definitions. For example:

Code:
.copy {
    font-family: "EBGaramond", serif;
    font-size: 0.9em;
    margin-top: 0em;
    margin-bottom: 0em;
    text-align: center;
}
A standard-compliant reader or app should render the text in the fallback font.
Doitsu is offline   Reply With Quote
Old 10-30-2022, 08:21 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,222
Karma: 19000635
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
There shouldn't be a problem with a font-family reference. The problem ePubcheck would have is the @font-face that is left behind referencing a resource that is not found. That generates an error.

Code:
@font-face {
    font-family: RandomFont;
    font-weight: bold;
    font-style: normal;
    src: url('../Fonts/RandomFont.ttf');
}
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2022-10-30 072438.png
Views:	77
Size:	44.7 KB
ID:	197457  

Last edited by Turtle91; 10-30-2022 at 08:25 AM.
Turtle91 is offline   Reply With Quote
Old 10-30-2022, 08:54 AM   #10
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,222
Karma: 19000635
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by tatagi View Post
thank you all for the replies.
I am messing around with epubs to get a result I've expected with different settings.

a few more questions would be:

1. are there any viewers available on Windows that support multiple default fonts for different elements? e.g times new roman for header, segoi ui for body etc., of course with the right manifestation.

2. any editor that shows any missing or broken glyphs between with or without embedded fonts? so I can detect if removing the embedded fonts will cause the issues and where they are.
Sigil and Calibre Editor both have viewers.

The font-family declaration can state multiple default fonts for a particular element/class. You just need to specify which ones you want in your css file:
Code:
h1   {font-family: Times, Arial, Helvetica, sans-serif}
body {font-family: seguiUI, Charis, Helvetica, serif}
p    {font-family: Wingdings, Alegreya, Academy}
The problem with a Windows viewer is that it can reference any fonts installed on your system if it can't find the embedded font file...so you'd have to do a little more extensive troubleshooting and/or remove the font from your windows environment completely.

If an embedded font file has been subset then you will see the difference in font type when you open the file in Sigil (double-click the font-file in the Book Browser). I'm not sure if/how Calibre handles that??? The attached file was subset to include only the letters Aa-Dd and Ww-Zz)
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2022-10-30 075126.png
Views:	84
Size:	178.5 KB
ID:	197458  
Turtle91 is offline   Reply With Quote
Old 10-30-2022, 09:25 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,222
Karma: 19000635
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
It would probably be easier to just embed your font files...then you don't have to worry about what is installed on your windows system. Sigil will only look at your system if it can't find the embedded font.

With font embedded:





Without font embedded (referencing font installed on the windows system):
Turtle91 is offline   Reply With Quote
Old 10-30-2022, 09:35 AM   #12
tatagi
Connoisseur
tatagi began at the beginning.
 
Posts: 52
Karma: 10
Join Date: Oct 2022
Device: none
Quote:
Originally Posted by Turtle91 View Post
Sigil and Calibre Editor both have viewers.

The font-family declaration can state multiple default fonts for a particular element/class. You just need to specify which ones you want in your css file:
Code:
h1   {font-family: Times, Arial, Helvetica, sans-serif}
body {font-family: seguiUI, Charis, Helvetica, serif}
p    {font-family: Wingdings, Alegreya, Academy}
The problem with a Windows viewer is that it can reference any fonts installed on your system if it can't find the embedded font file...so you'd have to do a little more extensive troubleshooting and/or remove the font from your windows environment completely.

If an embedded font file has been subset then you will see the difference in font type when you open the file in Sigil (double-click the font-file in the Book Browser). I'm not sure if/how Calibre handles that??? The attached file was subset to include only the letters Aa-Dd and Ww-Zz)
Thank you for the clarification.
That's too bad SumatraPDF stopped supporting the choice of default font by users. it's faster than almost any epub viewers one can use on Windows.

for the 2nd question, I meant to ask if there're editor features or plugins that act like diff tool(text comparison), in this case comparing two epub files(for my case one using system font and the other using embedded fonts to highlight any difference(especially broken glyphs due to lack of coverage) in text, or preferably provides the analysis report of text difference detected.
tatagi is offline   Reply With Quote
Old 10-30-2022, 10:41 AM   #13
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: 76,402
Karma: 136466962
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
Thank you for the clarification.
That's too bad SumatraPDF stopped supporting the choice of default font by users. it's faster than almost any epub viewers one can use on Windows.

for the 2nd question, I meant to ask if there're editor features or plugins that act like diff tool(text comparison), in this case comparing two epub files(for my case one using system font and the other using embedded fonts to highlight any difference(especially broken glyphs due to lack of coverage) in text, or preferably provides the analysis report of text difference detected.
No checker/diff will show you what's characters won't render. That depends on the font being used.

You can diff easily using the Calibre editor.

What Reader or software are you using to read your eBooks?
JSWolf is offline   Reply With Quote
Old 10-30-2022, 11:22 AM   #14
tatagi
Connoisseur
tatagi began at the beginning.
 
Posts: 52
Karma: 10
Join Date: Oct 2022
Device: none
Quote:
Originally Posted by JSWolf View Post
No checker/diff will show you what's characters won't render. That depends on the font being used.

You can diff easily using the Calibre editor.

What Reader or software are you using to read your eBooks?

I don't usually read books with mobile devices, but I use SumatraPDF app on my laptop.

since 3.4 release the rendering engine has changed and declaring the default font used has been disabled.

can you please explain how I should diff font removed epub from the original one with embedded fonts using calibre?
tatagi is offline   Reply With Quote
Old 10-30-2022, 05:02 PM   #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: 76,402
Karma: 136466962
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
I don't usually read books with mobile devices, but I use SumatraPDF app on my laptop.

since 3.4 release the rendering engine has changed and declaring the default font used has been disabled.

can you please explain how I should diff font removed epub from the original one with embedded fonts using calibre?
You have to have two copies of the eBook.

Load the one you want to work on in the Calibre editor. When you are ready to compare, go to File > Compare to another book and select the other copy. You can see any differences that way.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre not removing files in autoadd folder? ownedbycats Calibre 3 09-13-2022 10:36 PM
Removing of Charis Fonts from ePub sudhakarharidoss ePub 1 06-18-2020 03:03 PM
epub -> mobi removing fonts BKh Conversion 2 02-04-2012 05:32 PM
Removing embedded fonts for PRS-T1 tayseidel Conversion 5 12-27-2011 02:56 PM
Removing embedded fonts from ePubs paulfiera Calibre 14 06-06-2011 08:15 AM


All times are GMT -4. The time now is 04:39 AM.


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