10-28-2022, 10:25 PM | #1 |
Connoisseur
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! |
10-29-2022, 09:35 AM | #2 |
A Hairy Wizard
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. |
Advert | |
|
10-29-2022, 10:17 AM | #3 |
Ebook reader
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. |
10-29-2022, 12:40 PM | #4 | |
Grand Sorcerer
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
|
|
10-29-2022, 06:07 PM | #5 | |
Running with scissors
Posts: 1,557
Karma: 14325282
Join Date: Nov 2019
Device: none
|
Quote:
|
|
Advert | |
|
10-29-2022, 06:23 PM | #6 |
Resident Curmudgeon
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. |
10-30-2022, 07:05 AM | #7 |
Connoisseur
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. |
10-30-2022, 07:09 AM | #8 | |
Grand Sorcerer
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Code:
.copy { font-family: "EBGaramond", serif; font-size: 0.9em; margin-top: 0em; margin-bottom: 0em; text-align: center; } |
|
10-30-2022, 08:21 AM | #9 |
A Hairy Wizard
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'); } Last edited by Turtle91; 10-30-2022 at 08:25 AM. |
10-30-2022, 08:54 AM | #10 | |
A Hairy Wizard
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:
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} 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) |
|
10-30-2022, 09:25 AM | #11 |
A Hairy Wizard
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): |
10-30-2022, 09:35 AM | #12 | |
Connoisseur
Posts: 52
Karma: 10
Join Date: Oct 2022
Device: none
|
Quote:
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. |
|
10-30-2022, 10:41 AM | #13 | |
Resident Curmudgeon
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:
You can diff easily using the Calibre editor. What Reader or software are you using to read your eBooks? |
|
10-30-2022, 11:22 AM | #14 | |
Connoisseur
Posts: 52
Karma: 10
Join Date: Oct 2022
Device: none
|
Quote:
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? |
|
10-30-2022, 05:02 PM | #15 | |
Resident Curmudgeon
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:
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. |
|
|
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 |