Page 1 of 1
How to modify the vertical space ?
Posted: 2009-08-07T03:08:27-07:00
by Mumu_cn
I use convert to convert a font png file like this,
convert -background '#000000' -fill '#ffffff' -font /tmp/MSYHBD.TTF -pointsize 16 -gravity north -size 16x2048 label:@chfile font.png
but, I found the vertical space of the characters in png file is high. I hope the characters arrenged one after another form top to bottom with the smallest space.
could someone give me some adviceļ¼ thanks very much .
Re: How to modify the vertical space ?
Posted: 2009-08-07T10:54:01-07:00
by fmw42
I don't think IM has line spacing attribute control, but see
http://www.imagemagick.org/Usage/text/#kerning
I will defer to the experts on this.
Re: How to modify the vertical space ?
Posted: 2009-08-07T18:40:36-07:00
by anthony
No we have controls to add/remove inter-character and inter-word, but we don't have inter-line spacing controls yet
One 'slow' technique is to use a script like divide-vert
http://www.imagemagick.org/Usage/scripts/divide-vert
to split the text lines into a sequence of line/blank images, and then splice an extra row to each image, before appending them back together.
See the top of the script for various techniques.
This has not been Exampled. The script is a 'proof of concept' for one form of image segmention.
As is the 'segment_image' script in the same directory.
Re: How to modify the vertical space ?
Posted: 2009-08-07T19:37:44-07:00
by Mumu_cn
anthony wrote:No we have controls to add/remove inter-character and inter-word, but we don't have inter-line spacing controls yet
One 'slow' technique is to use a script like divide-vert
http://www.imagemagick.org/Usage/scripts/divide-vert
to split the text lines into a sequence of line/blank images, and then splice an extra row to each image, before appending them back together.
See the top of the script for various techniques.
This has not been Exampled. The script is a 'proof of concept' for one form of image segmention.
As is the 'segment_image' script in the same directory.
thank u very much , i will try