View Single Post
Old 11-20-2011, 05:16 PM   #129
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@DSquared125 - I don't believe so. This plugin uses calibre code to locate fonts on the system, which in turn uses a third party 'fontconfig' plugin if what I saw in the code is correct. Perhaps Kovid can chime in if he spots this. My code uses this:
Code:
self.font_family_model.families = fontconfig.find_font_families(allowed_extensions=['ttf'])
The only thing I could "possibly" do is change what extensions are searched for - as you found I currently only allow for .ttf fonts. This was code I copied from elsewhere in Calibre. I don't know anything about Mac OS fonts (or fonts in general) to know what the impact of trying to support a .dfont (or indeed whether that fontconfig plugin supports them), so it isn't a change I would rush into without someone confirming the impact.
kiwidude is offline   Reply With Quote