Hi Kevin,
Quote:
Originally Posted by KevinH
I am confused. If you use bk.addfile to add a new file to the ebook and then use bk.deletefile to remove that same file, you should net to no change in the underlying epub? Or are you saying hat a deletefile on some other file will not work after any addfile?
|
To test bk.deletefile() I opened Sigil without a book ran the original plugin, which added the font file to the epub. So far so good. I then saved the file, reopened it, changed the the last file in the plugin code from:
Code:
bk.addfile('doitsu', binary_file, data, 'application/x-font-ttf')
to:
Code:
bk.deletefile('doitsu')
I then ran the modified plugin again, which removed the font that I added during the first run from the .opf file and the Book View Fonts folder but not the actual Fonts folder in the epub.
D.