To use just cd to a folder containing the images to be annotated, modify the following as needed (like font names and the $auth variable), and run it. The database used by the locate utility which imagick_type_gen.pl relies on might also need to be updated:įor the annotation itself I wrote a script that use the file name of the image and a manually assigned string for text, and the image’s luminance to decide whether it should be dark with a light stroke, or vice versa. It appears that imagick_type_gen.pl has a hard time finding fonts stored at the user level, so it might be better to keep them alongside the others at /Library/Fonts, or wherever they are.
If you’re still not impressed you might want to visit the third link at the top to see how to use fondue, or you could install some nice free fonts, like Linux Libertine and GNU FreeFont, both found at CTAN (very much the predecessor to R’s CRAN). A use-after-free in RenderFreetype in MagickCore/annotate.c in ImageMagick 7.0.7-4 Q16 allows attackers to crash the application via a crafted font file.
Perl imagick_type_gen.pl > ~/.magick/type.xml
The following little snipped will download that script, run it and save its output in a place where IM can find it. Luckily there is a script you can run to remedy this. In all likelihood, you do have some usable fonts, IM just doesn’t know where to find them. If you do get something, be aware that IM can only use fonts in the. If not much appears to happen, you only get a blank line, press ctrl-c to cancel the call.
To check what you already have, type in a terminal: I also assume ImageMagick to already be installed.įirst things first, you need fonts. This guide is largely an aggregate of already existing information: