Re: feature request: iterable font list
John J Foerch <[email protected]> Tue, 08 Apr 2008 21:25:53 -0400
| Newsgroups | gmane.comp.video.image-magick.devel |
|---|---|
| Message-ID | <[email protected]> |
Glenn Randers-Pehrson <[email protected]> writes: > At 08:53 PM 4/8/2008 -0400, John J Foerch wrote: >>Hello, >> >>My feature request is for a variant of: >> >> convert -list font >> >>such that the font names are given in a simple list without truncation, >>so that one can iterate over the output in a shell script, running a >>command for each font, like this: >> >> convert -font "$FONT" label:foo "$FONT.png" > > I think you can do that already with the existing code: > > for x in `convert -list font | sed "s/ .*//" | sed "1,5d"` > do > convert -font $x label:foo $x.png > done > > Glenn Hi Glenn, Since long font names are truncated in the output of -list font, this technique does not work. Processing the output of -list font is further complicated by heading lines such as the "Path:" lines, column titles, and "-----" horizontal lines. Thank you, John Foerch