"label"->"annotate" auto-fontsize problem [invalid, delete]
Posted: 2014-09-26T23:24:41-07:00
I'm experiencing a weird issue I think could be a bug or bad behavior on im's side with the free font "Stark". I'm trying to find the best pointsize to fit a caption into a pre-determined width with "label"...
... and then use the pointsize read from this command for "annotate".
But with some strings, the "annotate" width is too large - I checked this by comparing the "label" width from the above command with a measurement using and image editor for the "annotate" result.
It just managed to narrow it down to the font used: If I use the stock "Arial" it works in all cases, the problem only occurs when using the free font "Stark". But why would it do that? Is the code used for determining the point size with label: different from writing with "annotate" so that "Stark" renders in a different way?
Code: Select all
convert -quiet -ping ( -size 1000x -background black -fill white label:"%string%" ) -format "width=%w\npointsize=%[label:pointsize]" info:
But with some strings, the "annotate" width is too large - I checked this by comparing the "label" width from the above command with a measurement using and image editor for the "annotate" result.
It just managed to narrow it down to the font used: If I use the stock "Arial" it works in all cases, the problem only occurs when using the free font "Stark". But why would it do that? Is the code used for determining the point size with label: different from writing with "annotate" so that "Stark" renders in a different way?