03-21-2016, 06:50 PM | #1 |
Grand Sorcerer
Posts: 27,902
Karma: 198500000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
[Plugin] AddiBooksXML
AddiBooksXML: use this plugin to add the iBooks proprietary "com.apple.ibooks.display-options.xml" file to the META-INF folder of an epub.
** NOTE: this plugin periodically checks for updated versions by connecting to github (where the source is maintained). See the end of this post for more details (including how to disable the check) ** Minimum Sigil requirement: v0.9.0 or higher Python Requirements: Python 3.4+ (Bundled or external) OS Requirements: Windows/Linux/OS X *** Linux users will have to make sure that the Tk graphical python module is present if it's not already. On Debian-based flavors this can be done with "sudo apt-get install python3-tk" for python 3. On Arch distributions it can be done with pacman -S tk and/or pacman -S python-pyqt5) *** *Note: Do not rename any Sigil plugin zip files before attempting to install them * Select a pre-existing (and iBooks valid) XML file using the file dialog and it will be added as "com.apple.ibooks.display-options.xml". You won't be able to edit the file in Sigil, so make sure it's correct/complete before adding. You can always delete it in Sigil and add it again if something goes wrong. Files like these show up in Sigil's "Misc" folder, but rest assured that it's actually going into the META-INF folder. Configurable preferences (available after first run in the plugin's corresponding json prefs file) are:
AddiBooksXML's code is hosted/maintained on Github. This plugin's update checker will only try to check for updates after at least 12 hours has elapsed since its last check. The plugin will only notify you about updates once for each new version released. No nagging, I promise. But if you don't like it, by all means disable the update checker by setting the "check_for_updates" option to false in the plugin's preference file as mentioned above. Changes v0.1.0 - Initial release
Last edited by DiapDealer; 04-22-2018 at 09:40 AM. |
11-16-2017, 01:10 PM | #2 |
Guru
Posts: 674
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Thanks.
Have been making epubs for iBooks for a year and just found out it wasn't using my embedded fonts... I was a little surprised that I had to supply the XML myself. Since it's just 169 bytes and never changes (theoretically, you could use it to disallow specified fonts, but why would anyone do that?) I thought it would be included and generated on the fly. If you ever revisit this, I suggest that option, can allow user supplied as well if you think useful. Also, a few lines to explain just what the file does and why it's needed might be useful. I found this: http://guidohenkel.com/2015/04/custom-fonts-in-ibooks/ Last edited by AlanHK; 11-16-2017 at 01:24 PM. |
11-16-2017, 01:42 PM | #3 |
Grand Sorcerer
Posts: 27,902
Karma: 198500000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Being something that I've never actually had to use myself, I thought it best to allow users to supply their own display-options.xml file. Mainly because a cursory search at the time revealed several different options and uses for the file. I didn't want to pigeonhole anyone unnecessarily. It wouldn't be hard for me to generate a default xml file if the user chooses to do so, though. I'll look into it.
|
11-17-2017, 09:35 PM | #4 |
Guru
Posts: 674
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Here's a commented com.apple.ibooks.display-options.xml.
Code:
<display_options> <platform name="*"> <!-- allowed values for platform "iphone", "ipad", or "*" for all --> <option name="specified-fonts">true</option> <!-- must be set to "true" for embedded fonts --> </platform> </display_options> Perhaps there are other XMLs you'd include for other reasons. |
11-17-2017, 09:51 PM | #5 |
Grand Sorcerer
Posts: 27,902
Karma: 198500000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
You're overlooking the iBooks fixed-layout, interactive, and orientation-lock options for the com.apple.ibooks.display-options.xml file. It's not only used for fonts.
Code:
<?xml version="1.0" encoding="UTF-8"?> <display_options> <platform name="*"> <option name="specified-fonts">true</option> <option name="interactive">true</option> <option name="fixed-layout">true</option> <option name="open-to-spread">true</option> </platform> <platform name="iphone"> <option name="orientation-lock">landscape-only</option> </platform> </display_options> Last edited by DiapDealer; 11-17-2017 at 09:59 PM. |
11-17-2017, 11:25 PM | #6 |
Guru
Posts: 674
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
|
11-19-2021, 10:48 PM | #7 |
Guru
Posts: 674
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
I've discovered that you need the
com.apple.ibooks.display-options.xml file (in ePub2) for iBooks, even if you have no embedded fonts, are just using e.g. font-family: sans-serif; details: https://www.mobileread.com/forums/sh...56#post4174056 |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[FileType Plugin] YVES Bible Plugin | ClashTheBunny | Plugins | 27 | 01-16-2023 01:25 AM |
[Plugin] KindleImport Sigil plugin | DiapDealer | Plugins | 187 | 07-04-2022 10:11 AM |
Plugin not customizable: Plugin: HTML Output does not need customization | flyingfoxlee | Conversion | 2 | 02-24-2012 02:24 AM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |
New Plugin Type Idea: Library Plugin | cgranade | Plugins | 3 | 09-15-2010 12:11 PM |