![]() |
#46 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,696
Karma: 134319572
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
What you do is copy all of the images. Run with the RGB profile and any image that come out with 0 bytes is greyscale. Then take just those images (the original versions) and run them through the greyscale profile. Then put everything back where they came from and done. You can also do it in reverse as well. RGB processed with the greyscale profile also come out 0 bytes. An ePub (the one I sent you) I just optimized (using the profiles) came out with the images totaling 334KB. The same images using ePUBOptimizer came out to be 340KB. I know 6KB isn't a lot, but it does add up. I'd be happy to test if you decide to do it this way. Last edited by JSWolf; 12-04-2014 at 02:54 PM. |
|
![]() |
![]() |
![]() |
#47 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Hi
About ttf and otf FontShrinker dealt only with ttf fonts. EPUB Optimizer has been issued quite recently. Can it subset now otf fonts or there is no hope about it? |
![]() |
![]() |
Advert | |
|
![]() |
#48 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
It uses the same core and for now it remains ttf only. In theory it should also support otf, but it is a hit and miss. If I find the cause, I might be able to also support otf.
|
![]() |
![]() |
![]() |
#49 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Thanks and good luck.
Last edited by roger64; 12-10-2014 at 07:26 PM. Reason: fonts |
![]() |
![]() |
![]() |
#50 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
It seems that they are multiple types of otf fonts. Some of them resemble ttf and those work fine. Others resemble Type 1 and those give issues apparently. If I find the solution, I will of course implement this.
|
![]() |
![]() |
Advert | |
|
![]() |
#51 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,696
Karma: 134319572
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I know that ePUBOptimizer won't subset OTF fonts, but could you make it so if an OTF font is not used that it gets removed? Thanks.
|
![]() |
![]() |
![]() |
#52 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
New version of the plugin is out. With big thanks to KevinH I can now garantuee it will also work on OSX. I will adapt the first post to reflect the changes.
|
![]() |
![]() |
![]() |
#53 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
|
![]() |
![]() |
![]() |
#54 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,696
Karma: 134319572
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
![]() |
![]() |
![]() |
#55 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
New version of the plugin is out. There was a serious bug in the ePUBOptimizer program which is solved now (don't worry, if you haven't noticed, the bug was not for you...). New is a change in the way of working. If from one font family multiple fonts are delivered, the actual usage per font is checked. However, if only one font for that font family is delivered, the usage of the complete font family is checked, not taking bold/italic into account. This is less strict perhaps, but resembles more the actual usage of fonts in ePUB I guess.
|
![]() |
![]() |
![]() |
#56 | ||
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,160
Karma: 18843349
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
|
Man...I disappear for a little bit and you guys go and do all kinds of really cool things...
![]() Toxaris, I got this unhandled exception message when I ran the plugin on my shell/default epub saying that ':first-letter' has an invalid token: Quote:
CSS: Quote:
|
||
![]() |
![]() |
![]() |
#57 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
No, it does support pseudo-classes, although most readers don't... However, the following pseudo-classes are currently not supported:
- :first-line - :first-letter - :before - :after Now, :before and :after would not be an issue I guess, but the other ones might. Still, it should not cause an error. The issue with these pseudo-classes is that they address portions of text within a tag, which cannot be translated to an XPath statement which I use to inline the CSS (necessary to properly determine the styling of tags). I think I can work around the :first-letter, but the :first-line might be much more difficult. I need to read into the :first-line a bit more, but IIRC the first line will differ on things like font-size and screen-size. If that is the case, it will become quite difficult to incorporate that. I will look into this more and will report back. Last edited by Toxaris; 03-01-2015 at 02:04 AM. |
![]() |
![]() |
![]() |
#58 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
I have updated the plugin to reflect the changes in Sigil. It now supports version 3.4 of Python (with a very big thank you to Doitsu!).
|
![]() |
![]() |
![]() |
#59 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
There were some small errors in the conversion. Now it will work on both 2.7 and 3.4.
I also forgot to incorporate the error as mentioned by Turtle91. That one is fixed as well... |
![]() |
![]() |
![]() |
#60 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Jan 2015
Device: Nook STR
|
I've got an error while downloading the plugin
Sorry, this file is infected with a virus |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Comic optimizer script | rhon | Kobo Reader | 0 | 11-08-2012 06:04 PM |
Mokle - Mangas Optimizer for Kindle | devorez | Kindle Developer's Corner | 11 | 08-14-2012 07:15 PM |
Patent/Heavy graphics pdfs and Adobe PDF Optimizer | andrewscheinman | iRex | 4 | 12-26-2009 11:39 AM |
epub, ePub, EPUB, warum blos ePub? | flowoeB | Lounge | 5 | 11-27-2009 09:37 AM |
PRS-500 PDF file optimizer | phigdon | Sony Reader Dev Corner | 1 | 04-01-2007 11:40 PM |