View Single Post
Old 12-28-2019, 07:10 AM   #2
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,738
Karma: 24031403
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Vroni View Post
what am i doing wrong?
bk.font_iter() might fail, if the fonts don't have the proper mime type.

Please post the font manifest section of your test epub. For example,

Code:
<item id="LinLibertineG30-Regular.ttf" href="LinLibertineG30-Regular.ttf" media-type="application/vnd.ms-opentype"/>
The following quick & dirty version will also work with fonts that have the wrong mime type:

Code:
def run(bk):
    print('xxx-|Start|-xxx')
    for id, href, mime in bk.manifest_iter():
        if href.endswith('tf'):
            print('xxx-|',id , '|-xxx')
            print('xxx-|',href , '|-xxx')
            print('xxx-|',mime , '|-xxx')
    print('xxx-|End|-xxx')
Doitsu is offline   Reply With Quote