Really Big Fonts:Solved
Joel Hammer
Joel
Mon May 17 11:38:49 PDT 2004
Sheez. Finally got this solved.
Just for anybody else doing this, I was trying to put text labels into
microscopic images (tif) files. The font size was too small for some
pictures. The solution is below. Skip the whining, if you want.
In man convert's own words:
====================
-font name
use this font when annotating the image with text.
If the font is a fully qualified X server font
name, the font is obtained from an X server (e.g.
-*-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-*). To use a TrueType
font, precede the TrueType filename with a @ (e.g. @times.ttf).
Otherwise, specify a Postscript font (e.g. helvetica).
========================
I tried the scalable X server fonts, but failed with that. I don't know
what a "postscript" font is. However, I did finally figure out that you
need to capitalize the first letter of the font name, at least on my
box. I finally stumbled across the crucial parameter, several days later,
-pointsize, which allows you to set the font size for postscript text.
So, problem solved.
For ttf, you really have to supply the entire path name. @times.fft really
needs to be something like:
@/mnt/hda4/usr1/X11R6/lib/X11/fonts/TrueType/anklepan.ttf
(I don't seem to have any sensible TrueType fonts like Times on my system.)
Maybe I'll stumble across the scaling command for ttf fonts in man convert
somewhere, too.
ANYWAY, TO ANNOTATE AN IMAGE WITH A LARGE RED LABEL WITH A "POSTSCRIPT"
FONT, SOMETHING LIKE THIS WORKS:
convert -font Times -pointsize 70 -pen red -draw "text 100,100 MyLabel" in.TIF out.TIF
It looks like convert will complete the font name for you, since my font is
really Times-Roman, I think.
It looks like all the postscript fonts in /usr/local/afm are available,
but I just don't know where convert is really looking for these fonts.
grep'ing through strings convert didn't show me anything.
Why you don't need to supply a path name to the afm file is beyond me.
One of convert's more confusing features is this: If you misspell a font
name, like:
-font Helvetica-Obl
convert just gives you its default font, which is helvetica, without any
warning.
Well, same old whine. Great piece of software made very difficult to
use by marginal documentation. For the want of a couple of lines about
font sizes in the -font section, I wasted at least 4 hours. I tried to
subscribe to the ImageMagick email loop, but there was no response from
their email server, so, forget about support. This is a great way of
keeping opensource off the desktop.
Joel
On Sun, Oct 13, 2002 at 01:16:57PM -0400, Joel Hammer wrote:
> I am still trying to label microscope photos with text, but I need really
> big fonts to make the text visible on the low power views. The largest point
> size that seems to come with X windows is 34, much too small. I can't get
> convert to work with scalable fonts.
> SO,
> Is there a place to get fonts for X windows with very large point size?
> Thanks,
> Joel
More information about the Linux-users
mailing list