underline line width and vertical distance of underliine

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Ravinderjit S.Sidhu

underline line width and vertical distance of underliine

Post by Ravinderjit S.Sidhu »

Is there any option in -draw decorate underline which can give underline with some more distance below the text
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: underline line width and vertical distance of underliine

Post 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.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: underline line width and vertical distance of underliine

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: underline line width and vertical distance of underliine

Post 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.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: underline line width and vertical distance of underliine

Post 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");
?> 
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: underline line width and vertical distance of underliine

Post 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.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: underline line width and vertical distance of underliine

Post by Bonzo »

Oh I forgot to say I am using 6.3.4
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: underline line width and vertical distance of underliine

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply