$ display /usr/share/fonts/truetype/freefont/FreeMono.ttf (displays font summary)
$ cp /usr/share/fonts/truetype/freefont/FreeMono.ttf foo
$ display foo
display: no decode delegate for this image format `foo' @ constitute.c/ReadImage/530.
$ mv foo foo.ttf
$ display foo.ttf (displays font summary)
This -- somewhat -- matters when handling font resources for digital cinema. Those might have uuid filenames:
$ file 3dec6dc0-39d0-498d-97d0-928d2eb78391
3dec6dc0-39d0-498d-97d0-928d2eb78391: TrueType font data
This with ImageMagick 6.5.7-8 2009-11-26 Q16 (Ubuntu 10.04's default, unfortunately)
No file magic for truetype files?
-
- Posts: 34
- Joined: 2010-02-25T15:22:50-07:00
- Authentication code: 8675308
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: No file magic for truetype files?
I suspect IM looks to the file suffix to decide what delegate library to use to display the image. Since foo has no suffix, IM says it does not have the delegate library to handle this. Don't know if this helps you or not.
-
- Posts: 34
- Joined: 2010-02-25T15:22:50-07:00
- Authentication code: 8675308
Re: No file magic for truetype files?
Fred, yes, obviously. I tend to think that IM's display of fonts should be aligned with the behaviour for image files (where suffixes are not relevant for finding the right delegate and file magic is used instead. But then again, maybe it's done differently?)
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: No file magic for truetype files?
I can only assume it has something to do with the X11 display. But I understand your thoughts.
Re: No file magic for truetype files?
Add this to your magic.xml configuration file:
- <magic name="TTF" offset="0" target="\000\001\000\000"/>
-
- Posts: 34
- Joined: 2010-02-25T15:22:50-07:00
- Authentication code: 8675308
Re: No file magic for truetype files?
Thanks. Works. Should've RTFM.