On Sun Jun 25 12:22:24 2017, COLINK wrote:
Show quoted text> It looks like Imager uses file extensions to detect what kind of font
> is being supplied to Imager::Font. It would be really nice if it used
> something like Image::Exiftool to do that detection instead.
Sorry about the delay in noticing this.
I assume you mean some sort of magic number detection like Imager already does for images. Image::Exiftool sounds a little heavy for that though.
It's an idea, but it may slow down creating a new font object, since Imager would need to open the file, check for magic, close the file, then hand off to the correct font handler.
You can get pretty much the detection behaviour by always using the FT2 handler, since Freetype 2 supports and overwhelming superset of the fonts the other drivers support.
I'll leave this open as a wishlist item, but it's pretty unlikely I'll implement it.
Thanks,
Tony