Quote:
Originally Posted by Doitsu
AFAIK, only the font-family parameter is required. epubcheck doesn't report a warning or error message if the font-weight and font-style parameters are missing and epubs are correctly rendered by ADE without these parameters.
You may want to update your plugin so that it only removes fonts if the embedded fonts are either not used in the stylesheet or stylesheet definitions that reference the embedded fonts aren't actually used.
|
If it is not specified, the default values of 'font-weight:normal' and 'font-style: normal' apply (see also
here or
here). In this case the font is used only as bold. There is no font in this font-family with that specifics. Therefore the font is considered as not being used. I would not be surprised at all if some readers or reading programs would not show the font due to this.
A font-family can have multiple members and the used glyphs per usage is determined. Fonts that are not used in text or stylesheet will be removed.
Quote:
Originally Posted by Doitsu
BTW, the plugin doesn't work with my Debian Linux 3.2.0-4-amd64 x86_64 distro, even though Debian mono 2.10.8.1-8 is installed. What mono version did you test it with?
It fails with the following error message:
Code:
Traceback (most recent call last):
File "/usr/local/share/sigil/plugin_launchers//python/launcher.py", line 135, in launch
self.exitcode = target_script.run(container)
File "/home/user/.local/share/sigil-ebook/sigil/plugins/ePUBOptimizer/plugin.py", line 58, in run
with open(actionlist) as f:
IOError: [Errno 2] No such file or directory: '/home/user/.local/share/sigil-ebook/sigil/plugins/ePUBOptimizer/actionlist.txt'
Error: [Errno 2] No such file or directory: '/home/user/.local/share/sigil-ebook/sigil/plugins/ePUBOptimizer/actionlist.txt'
I assume that one of the binaries failed to generate actionlist.txt. To be on the safe side, you may want to check that actionlist.txt was actually generated, before you try to open it.
|
Thanks, I was going to adapt the plugin to check for the actionlist already. It is strange that the actionlist is not written. I have tested it on Linux Mint. I will check my mono version, although I think that is not the issue here.
Quote:
Originally Posted by Doitsu
The Windows version of the plugin also failed with some books, for example this book, which crutledge uploaded a couple of days ago.
I'm getting the following error message:
Code:
Processing C:\Users\User\AppData\Local\sigil-ebook\sigil\plugins\ePUBOptimizer\dummy.epub
Get unique characters per font
[...]
Unhandled exception: System.Xml.XPath.XPathException: Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function.
|
I will run his book through the debugger to see what is going on and where. So far I cannot reproduce this.