[magick-developers] Re: feature request: iterable font list

John J Foerch jjfoerch at earthlink.net
Tue Apr 8 18:25:53 PDT 2008


Glenn Randers-Pehrson <glennrp at comcast.net> 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



More information about the Magick-developers mailing list