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

Go Back   MobileRead Forums > E-Book Software > Sigil > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 12-04-2014, 02:49 PM   #46
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: 73,668
Karma: 127838212
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 Toxaris View Post
No, not until I can find a good way to determine if a picture is grayscale or color.
That's actually easier then you think due to the way the images get processed with the profiles.

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.
JSWolf is offline   Reply With Quote
Old 12-10-2014, 09:34 AM   #47
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)
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?
roger64 is offline   Reply With Quote
Advert
Old 12-10-2014, 03:28 PM   #48
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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.
Toxaris is offline   Reply With Quote
Old 12-10-2014, 07:23 PM   #49
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)
Thanks and good luck.

Last edited by roger64; 12-10-2014 at 07:26 PM. Reason: fonts
roger64 is offline   Reply With Quote
Old 12-11-2014, 01:59 AM   #50
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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.
Toxaris is offline   Reply With Quote
Advert
Old 12-16-2014, 12:43 PM   #51
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: 73,668
Karma: 127838212
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 Toxaris View Post
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.
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.
JSWolf is offline   Reply With Quote
Old 12-16-2014, 01:28 PM   #52
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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.
Toxaris is offline   Reply With Quote
Old 12-16-2014, 01:30 PM   #53
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Quote:
Originally Posted by JSWolf View Post
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.
I could. Perhaps in the new version. I am still working on supporting OTF fonts.
Toxaris is offline   Reply With Quote
Old 12-16-2014, 02:19 PM   #54
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: 73,668
Karma: 127838212
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 Toxaris View Post
I could. Perhaps in the new version. I am still working on supporting OTF fonts.
Even if you don't end up supporting OTF, removing unused OTF would help.
JSWolf is offline   Reply With Quote
Old 01-27-2015, 04:13 PM   #55
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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.
Toxaris is offline   Reply With Quote
Old 03-01-2015, 12:45 AM   #56
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,071
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 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:
Status: success

Processing C:\Users\Dion\AppData\Local\sigil-ebook\sigil\plugins\ePUBOptimizer\dummy.epub
Get unique characters per font

Unhandled Exception: System.Xml.XPath.XPathException: '//*[contains(concat(' ',normalize-space(@class),' '),' SecBrk2 ')]:first-letter' has an invalid token.
at MS.Internal.Xml.XPath.XPathScanner.NextLex()
at MS.Internal.Xml.XPath.XPathParser.ParsePredicate(A stNode qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParseStep(AstNod e qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParseRelativeLoc ationPath(AstNode qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParseLocationPat h(AstNode qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParsePathExpr(As tNode qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParseUnionExpr(A stNode qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParseUnaryExpr(A stNode qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParseMultiplicat iveExpr(AstNode qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParseAdditiveExp r(AstNode qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParseRelationalE xpr(AstNode qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParseEqualityExp r(AstNode qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParseAndExpr(Ast Node qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParseOrExpr(AstN ode qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParseExpresion(A stNode qyInput)
at MS.Internal.Xml.XPath.XPathParser.ParseXPathExpres ion(String xpathExpresion)
at System.Xml.XPath.XPathExpression.Compile(String xpath, IXmlNamespaceResolver nsResolver)
at System.Xml.XPath.XPathNavigator.Select(String xpath)
at HtmlAgilityPack.HtmlNode.SelectNodes(String xpath)
at Toxaris.ToxarisePUB.FunColl.ApplyStylesheetAsInlin e(String html, String style)
at ePUBOptimizer.Main.HandleePUB(String ePUB)
at ePUBOptimizer.Main.Main()
Does this not support pseudo-classes? or am I making a heretofore undiscovered mistake in my css?

CSS:
Quote:
.SecBrk2:first-letter {font-family:FunkyFont}
Turtle91 is offline   Reply With Quote
Old 03-01-2015, 01:46 AM   #57
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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.
Toxaris is offline   Reply With Quote
Old 11-08-2015, 03:21 PM   #58
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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!).
Toxaris is offline   Reply With Quote
Old 11-09-2015, 11:05 AM   #59
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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...
Toxaris is offline   Reply With Quote
Old 11-17-2015, 07:17 AM   #60
ovinio
Junior Member
ovinio began at the beginning.
 
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
ovinio 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
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


All times are GMT -4. The time now is 11:08 PM.


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