- Tong - on  wrote...
| On Fri, 22 Jun 2007 16:55:56 +0000, - Tong - wrote:
| 
| > I use the "-shade" operator to create beveled fonts. Ref:
| > http://www.imagemagick.org/Usage/fonts/#bevel
| > 
| > The problem is that I need the text to be on 2 lines, but the line spacing
| > is too wide for me, since my image is small:
| 
| Forgot to say, this is how I did it:
| 
|  convert -size 220x25 xc:black -font Candice -pointsize 14 -fill white \
|  -gravity center -annotate 0 'line1\nline2' -shade \
|  140x60 xpt.gif
| 
| Candice is a symlink to a ttf font file.
| 
Why?  define it properly in IM...
See the top level IM example page.
   http://www.imagemagick.org/Usage/#font

You can then add all your fonts into IM with nice names.

| The result is at,
| 
| > http://xpt.sourceforge.net/images/xpt.gif
| > 
| > I'm wondering if there is any way to reduce the line spacing in this
| > case?
| 
| Thanks!
| 
The pointsize of a font represents its line spaceing.  that is its
actual defination!!!!

It is then up to the font designers on how you want to fill that space.
And most of them do a horrible job of using that space!

But I knwo what you want.
If you are always using the same font and pointsize, you can
'-chop' out the extra space....

For example 5 rows of pixels from the 14th pixel form the top...

   convert http://xpt.sourceforge.net/images/xpt.gif \
      -chop 0x5+0+14  xpt_squeezed.gif

-----

Alternatively in a couple of days a new script will be up in
  http://www.imagemagick.org/Usage/scripts/
called  "divide-horiz"  Which is a quick script I wrote on the weekend
to solve a problem I was having.  The script works, but does not check
that each line also has the same color :-(

This divides an image into multiple images divided by lines of constant
color.  That is the 'gaps' in an image, That is images
will become a list of images of the form
   blanks, stuff, blanks, stuff,....
whcih if you -append  would re-form the original image.
Note if the image was 'trimmed' the first image would not be 'blank'.

You only need to remove or 'fix' the size of the blank 'gap' images.

I am wanting to get the funcationality of this script built into IM as a
-divide-horiz option.  Which along with a   -layers RemoveBlank
operation can be used to delete the blank images that are all one color.


  Anthony Thyssen ( System Programmer )    <[EMAIL PROTECTED]>
 -----------------------------------------------------------------------------
    "Seshmarl, to know the future is to change it,
     so that it wriggles like a many-headed snake.
     What you see is false, because you've seen it."
                                      -- Larry Niven "The Burning City"
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to