First.... remove your irrelevent '-extent' option in the bug report.
Second when you do add it, add it AFTER you created the the image with label. not before.
arguments to convert/magick are not 'option's but settings and operations (more script like) and processed in order, the only reason you do not get an error in IMv6 is due to legacy argument handling. In IMv7 the "magick" would give you an error (no image) for -extent, as you have no image at that point.
Code: Select all
magick -size 1656x250 -background white -fill black -gravity Center -extent 1676x260 label:"what what what what what what what what" show:
magick: no images found for operation `-extent' at CLI arg 9 @ error/operation.c/CLIOption/4939.
Okay .. enough rant...
Just this screws up, with the generated label longer that it should be...
This is a BAD start
Code: Select all
convert label:"what what what what what what what what" show:
This gets clipped
also bad
Code: Select all
convert -size 1656x250 label:"what what what what what what what what" show:
BUT this does not!
good!
Code: Select all
convert -size 1656x label:"what what what what what what what what" show:
Looks like the bug is in that label is fitting itself to image height causing it to get clipped width-wise. -- or I think
Looking at the reported pointsize...
Code: Select all
convert -size 1656x label:"what what what what what what what what" -print '%[label:pointsize]\n' null:
86.1484375
convert -size 1656x250 label:"what what what what what what what what" -print '%[label:pointsize]\n' null:
95.2421875
convert -size x250 label:"what what what what what what what what" -print '%[label:pointsize]\n' null:
220.826171875
Yeap IM is definatally picking the wrong font size, but it is not fiting label to height either. (initial theory disproved)
Checking the font bounds for the 'larger' (bad fit) pointsize See
Determining Font Metrics
Code: Select all
convert -size 1656x250 -debug annotate label:"what what what what what what what what" null:
...
Metrics: text: what what what what what what what what; width: 1791; height: 109; ascent: 86; descent: -20; max advance: 190; bounds: 0,-1 67.8594,68.8438; origin: 1790,0; pixels per em: 95,95; underline position: -4.5625; underline thickness: 2.34375
2013-05-10T12:25:53+10:00 0:00.040 0.020u 6.8.5 Annotate convert[10709]: annotate.c/RenderFreetype/1219/Annotate
Font /home/anthony/lib/fonts/truetype/sets/Arial.ttf; font-encoding none; text-encoding none; pointsize 95.2422
This is clearly NOT fitting the text into the requested width of 1656 (text width at this pointsize is 1791) Though the height (109) does not seem to match up to the requested height either.
Something is very wrong with the binary search to find the correct pointsize.
Bug Confirmed.
BUT it may also be wrong in general.
Code: Select all
convert label:"what what what what what what what what" -print '%[label:pointsize]\n' null:
11.1875
default pointsize when no size or pointsize is given should be 12, not 11!
Tracing font selections...
Code: Select all
convert -debug annotate label:"what what what what what what what what" null:
...lots of font size tests...
Why is it doing lots of tests for font size when it should be just 12 point!
another bug found
Adding -pointsize 12 to the above works fine, producing a label that perfectly the image size it determined form the font.
Though it still does 3 font metric tests.