Page 1 of 1

underline line width and vertical distance of underliine

Posted: 2007-11-12T02:21:12-07:00
by Ravinderjit S.Sidhu
Is there any option in -draw decorate underline which can give underline with some more distance below the text

Re: underline line width and vertical distance of underliine

Posted: 2007-11-12T07:16:23-07:00
by magick
The separation of text and its underline is determined from the font metrics. There is no user-controllable option to change this value.

Re: underline line width and vertical distance of underliine

Posted: 2007-11-13T11:57:15-07:00
by Bonzo
I found the decorate option this week as well; the line seems to close to the text for me to use. If I was to use it more I would have to look at a way to write the text then draw a line with -draw.

Also why did the line come out a blue colour, I would have thought it would be black the same as the text ?
Image

Re: underline line width and vertical distance of underliine

Posted: 2007-11-13T12:24:47-07:00
by magick
Post the code or command line you are using to create the image you posted. We need to reproduce the problem before we can comment.

Re: underline line width and vertical distance of underliine

Posted: 2007-11-13T12:27:45-07:00
by Bonzo
Here is the code I used:

Code: Select all

<?php 
exec("convert -size 230x130 xc:lightblue -font verdana.ttf -pointsize 25 -draw \"gravity NorthWest fill black Decorate Underline text 0,0 'The quick red fox
jumped over the
lazy brown dog.'\" font2.png");
?> 

Re: underline line width and vertical distance of underliine

Posted: 2007-11-13T13:56:22-07:00
by magick
We get a slightly different result with ImageMagick 6.3.7-0 Beta (available sometime tomorrow). There is an additional space between the text and the underline and the underline is nearly black. The underline appears to have some transparency associated with it which we are investigating now.

Re: underline line width and vertical distance of underliine

Posted: 2007-11-13T14:28:38-07:00
by Bonzo
Oh I forgot to say I am using 6.3.4

Re: underline line width and vertical distance of underliine

Posted: 2007-11-19T18:51:18-07:00
by anthony
I can also say that the results will vary with the version of the font libraries installed.

For example all my font changed (using the same version of IM with the same font files) when I changed my system from Fedora 7 to Ubuntu Gutsy. I am sure it is going to change again when to switch (for testing purposes) to Fedora 8 (werewolf).

Basically... Milage may vary! even with same IM version and font data.