Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 06-05-2011, 08:11 AM   #1
paulfiera
Addict
paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.
 
paulfiera's Avatar
 
Posts: 339
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: iPad, Kobo Glo
Question Removing embedded fonts from ePubs

I've noticed that some epubs have embedded 4 True Type Charis fonts making up for about 5 MBs. I'm not particularly fond of that font as I rather use the iPad's default Palatino which I think is good for reading on screen.


Two questions:

- Will removing these fonts break anything in the epub? I believe that if the style sheet is referencing these fonts and they are not found, the rendering will default to the system font, correct?

- Right now, for removing the fonts I explode the epub, remove the fonts from the fonts folder and rebuild the epub. Is there an option in the GUI to remove the embedded fonts - and perhaps all references to them in the style sheet?

Many thanks
paulfiera is offline   Reply With Quote
Old 06-05-2011, 08:49 AM   #2
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,055
Karma: 777825
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
This is the first request I have seen to REMOVE embedded fonts. The normal question seems to be about how to ADD them!
itimpi is offline   Reply With Quote
Old 06-05-2011, 09:45 AM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 25,952
Karma: 5036099
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Removing them may cause breakage, it depends on how they are used. Sometimes special fonts are used for special characters/metrics. There's no automated way to remove fonts, though if you ask kiwidude may add it to his epub fixer plugin.
kovidgoyal is online now   Reply With Quote
Old 06-05-2011, 10:26 AM   #4
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 660
Karma: 436517
Join Date: Jul 2010
Location: UK
Device: PRS-300 (R.I.P.), PW2, Nexus7
Quote:
Originally Posted by kovidgoyal View Post
There's no automated way to remove fonts, though if you ask kiwidude may add it to his epub fixer plugin.
I have manually removed these 4 Charis fonts from several ePubs as they are such a size overhead and would also find an automated option very helpful.

@paulfiera: I delete the font folder and also remove the references to the fonts in the stylesheet, (specifying my preferred system fonts instead). You may also need to remove them from the manifest, (OPF).
Agama is offline   Reply With Quote
Old 06-05-2011, 01:35 PM   #5
paulfiera
Addict
paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.
 
paulfiera's Avatar
 
Posts: 339
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: iPad, Kobo Glo
Thanks, guys.

I know storage space in computers is cheap and I shouldn't be worrying about a couple of megs per book - that's what the 5 MB fonts come down to when packed in an ePub, but this is not the case with tablets. Especially with iPads, where you do not have the possibility of external storage. And when you want to add a couple of hundred ePubs to your iPad - where you already have music and videos, these fonts really fill up.

I can only talk about iPad, as that's the only reader I've had, but it does a very decent job using Palatino as the default font. Sharp on the screen - for a serif font - and able to deal with non ASCII characters, from what I've seen.

I've done some tests removing the fonts from a couple of ePubs and at first sight, there seems to be no problem.

Agama, how would I remove them from the manifest?

I'd also like to vote for an option to remove both the fonts and all the references to them - CSS, manifest - from the GUI.

Kovid, should we ask kiwidude for this feature as an enhacement of the ePub fixer plugin or is it something you would consider adding to the main calibre program?
paulfiera is offline   Reply With Quote
Old 06-05-2011, 01:41 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 25,952
Karma: 5036099
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
epubfixer is the logical place for this.
kovidgoyal is online now   Reply With Quote
Old 06-05-2011, 01:52 PM   #7
paulfiera
Addict
paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.
 
paulfiera's Avatar
 
Posts: 339
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: iPad, Kobo Glo
Quote:
Originally Posted by kovidgoyal View Post
epubfixer is the logical place for this.
Many thanks, Kovid

I can't seem to find the epubfixer plugin. I have kiwidude's plugin updater and I've searched the plugins thread but can't find it.
paulfiera is offline   Reply With Quote
Old 06-05-2011, 02:14 PM   #8
alansplace
Wizard
alansplace ought to be getting tired of karma fortunes by now.alansplace ought to be getting tired of karma fortunes by now.alansplace ought to be getting tired of karma fortunes by now.alansplace ought to be getting tired of karma fortunes by now.alansplace ought to be getting tired of karma fortunes by now.alansplace ought to be getting tired of karma fortunes by now.alansplace ought to be getting tired of karma fortunes by now.alansplace ought to be getting tired of karma fortunes by now.alansplace ought to be getting tired of karma fortunes by now.alansplace ought to be getting tired of karma fortunes by now.alansplace ought to be getting tired of karma fortunes by now.
 
alansplace's Avatar
 
Posts: 3,773
Karma: 24496756
Join Date: Feb 2010
Location: USA, 33.938556° N, -117.271334° W
Device: Kindle 2, Kindle KB, Kindle PW 1 & 2, Kindle Voyage, Kindle Fire 2
Cool a possibility

Quote:
Originally Posted by paulfiera View Post
I've noticed that some epubs have embedded 4 True Type Charis fonts making up for about 5 MBs. I'm not particularly fond of that font as I rather use the iPad's default Palatino which I think is good for reading on screen.


Two questions:

- Will removing these fonts break anything in the epub? I believe that if the style sheet is referencing these fonts and they are not found, the rendering will default to the system font, correct?

- Right now, for removing the fonts I explode the epub, remove the fonts from the fonts folder and rebuild the epub. Is there an option in the GUI to remove the embedded fonts - and perhaps all references to them in the style sheet?

Many thanks
i'm not speaking from experience with this problem, but i'd think that if you were to convert the epub to mobi (i don't think that mobi stores any embedded fonts [i could be wrong]) then convert the mobi back to epub maybe you might lose those embedded fonts in the process. others may comment that i'm all wet (and that's ok), but i thought it worth mentioning it as an idea to try.
alansplace is offline   Reply With Quote
Old 06-05-2011, 02:25 PM   #9
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: 37,126
Karma: 18149000
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
It sounds like the OP is using (GASP!) iBooks and the embedded fonts won't work unless you do something non-standard. And in that case, you can pick from whatever fonts are on the list and they'll be used instead of the embedded fonts. iBooks does a lot of things non-standard.
JSWolf is offline   Reply With Quote
Old 06-05-2011, 07:07 PM   #10
jackie_w
Wizard
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: 2,792
Karma: 3973173
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"
Quote:
Originally Posted by paulfiera View Post
I can't seem to find the epubfixer plugin. I have kiwidude's plugin updater and I've searched the plugins thread but can't find it.
This is because it's still at beta-test stage. The main thread is here.
jackie_w is offline   Reply With Quote
Old 06-06-2011, 02:35 AM   #11
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 660
Karma: 436517
Join Date: Jul 2010
Location: UK
Device: PRS-300 (R.I.P.), PW2, Nexus7
Quote:
Originally Posted by paulfiera View Post
Agama, how would I remove them from the manifest?
Open the OPF file in the exploded ePub, (often it's called content.opf), and look for the section starting <manifest>. The elements in this section are supposed to list all the files which make up the publication. Simply delete all elements which reference the Charis fonts. These elements show up as <item href= ... />.

The fonts should not be referenced in the <spine> or <guide> sections but delete their entries if they are.

Note: Readers seem quite tolerant of ePubs where items present in the publication are NOT actually referenced in the manifest, so you may find that there are no references to the fonts - but it's best to check since a well formed ePub is likely to work on more readers than a poorly formed one. (I have known ADE fail to open books where I have created a faulty manifest section).
Agama is offline   Reply With Quote
Old 06-06-2011, 04:49 AM   #12
paulfiera
Addict
paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.
 
paulfiera's Avatar
 
Posts: 339
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: iPad, Kobo Glo
Quote:
Originally Posted by JSWolf View Post
It sounds like the OP is using (GASP!) iBooks and the embedded fonts won't work unless you do something non-standard. And in that case, you can pick from whatever fonts are on the list and they'll be used instead of the embedded fonts. iBooks does a lot of things non-standard.
Thanks, JSWolf

Yes, I am using iBooks. This iPad is the only reader I've got and it works OK. Not so good to read under sunlight but I can't afford another reader right now.

So, how would other readers behave if there is referenced a missing font in the style sheet? Wouldn't they default to a system font like browsers do?
paulfiera is offline   Reply With Quote
Old 06-06-2011, 04:50 AM   #13
paulfiera
Addict
paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.
 
paulfiera's Avatar
 
Posts: 339
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: iPad, Kobo Glo
Quote:
Originally Posted by jackie_w View Post
This is because it's still at beta-test stage. The main thread is here.
Thanks, jackie_w. Found it. Looks very interesting and I'm sure, it'll be great -as all kiwidude's plugins.
paulfiera is offline   Reply With Quote
Old 06-06-2011, 04:52 AM   #14
paulfiera
Addict
paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.
 
paulfiera's Avatar
 
Posts: 339
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: iPad, Kobo Glo
Quote:
Originally Posted by Agama View Post
Open the OPF file in the exploded ePub, (often it's called content.opf), and look for the section starting <manifest>. The elements in this section are supposed to list all the files which make up the publication. Simply delete all elements which reference the Charis fonts. These elements show up as <item href= ... />.

The fonts should not be referenced in the <spine> or <guide> sections but delete their entries if they are.

Note: Readers seem quite tolerant of ePubs where items present in the publication are NOT actually referenced in the manifest, so you may find that there are no references to the fonts - but it's best to check since a well formed ePub is likely to work on more readers than a poorly formed one. (I have known ADE fail to open books where I have created a faulty manifest section).
Many thanks Agama.

Great to know. Guess I'll be exploding a heck of a lot of epubs
paulfiera is offline   Reply With Quote
Old 06-06-2011, 07:15 AM   #15
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 660
Karma: 436517
Join Date: Jul 2010
Location: UK
Device: PRS-300 (R.I.P.), PW2, Nexus7
Quote:
Originally Posted by paulfiera View Post
Guess I'll be exploding a heck of a lot of epubs
Maybe kiwidude can come to the rescue with another plugin! This might be a bit trickier than his Modify ePub as it would have to do a bit more parsing - and perhaps allow user definition of a substitute font-name whenever an embedded font reference is found in, (and removed from), the CSS.

I also seem to recall some discussions in this forum on installing ePub fonts as external fonts rather than embedding. This would mean that the fonts were only in a single location on a device and then shared by all ePubs which reference them. Haven't tried this yet myself but it could be worth looking into.
Agama is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Embedded fonts? Greenmantle Kobo Reader 66 07-27-2011 08:20 PM
Removing embedded font/overwrite some css? silentguy Conversion 4 01-25-2011 12:41 PM
Embedded fonts, Calibre, and choice of fonts AlexBell ePub 8 05-30-2010 06:00 AM
Classic Support for embedded fonts in sideloaded EPUBs ? nycaleksey Barnes & Noble NOOK 6 02-25-2010 11:10 PM
Encypted Embedded Fonts in ePubs pdurrant ePub 9 09-24-2009 03:34 PM


All times are GMT -4. The time now is 01:10 AM.


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