Question

While i am using ImageMagick "-font" option to annotate images with text, such as:

convert my-file -font my-font.ttf ...

Will my-font.ttf be opened every time when i issue that command?

ps, i am using paperclip/rails to annotate images with text, "convert" command is called in paperclip processor. i am not sure "-font" way is efficiently enough or not? or will that kill a lot of memories? (my-font.ttf is more than 20M),

thanks in advance!

Was it helpful?

Solution

Fonts are not cached in ImageMagick. It will be read from disk every time text is drawn on an image. Maybe you should try to reduce the size of your ttf file to improve your performance. A ttf file that needs 20M sounds a bit excessive. Take a look at the following question to reduce the size of your file: Way to reduce size of .ttf fonts?.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top