Kree wrote: ↑2017-05-09T14:07:42-07:00As you can see, I try to use the
Turnpike font, what have accent characters, and they are only visible in the second line, but not in the first: [...] Which parameter can modify the first line's white space? The -interline-spacing works only between the lines.
This is going to be an issue with maybe 20% or more of fonts. I ran a quick loop in a directory of monospace fonts I use for labeling scientific images like weather maps and satellite images. Using IM v7.0.5-5 on Windows 10 and a command like this to generate the labels...
Code: Select all
magick -pointsize 48 -font "%FONT%" label:"Å" -gravity center -background #808080 -extent 48x72 test.png
... then assembling them into a montage to create this sampler...
... you can see that a random sampling of fonts will display this problem with a substantial percentage of them. The proportion seems to be similar even with fonts that aren't monospace when I run the loop in a directory with hundreds of fairly common Windows fonts.
I just accept that IM won't print the entire character, so I've developed work-arounds like adding a newline "\n" at the beginning of the label, then trimming and bordering as necessary to get my required size, something like
snibgo mentioned above. Another method I use in some scripts is to create the label with white characters on white, then use "-annotate" and "-gravity southwest" to apply black characters to that white label. I've also created the white on white label with one pointsize, then reduced the pointsize before using "-annotate" to print black characters on the label.
None of these "fixes" is ideal, but the issue has come up in the "Bugs" forum, and apparently it isn't something that can be easily fixed in the source code.