Really Big Fonts:Solved

Joel Hammer Joel
Mon May 17 11:38:49 PDT 2004


Just to add some more information.

My original note was done with a caldera 2.4 box and updates.  I tried
this same approach on my libranet box. The libranet box had font trouble,
too. I tried to install an updated version of ghostscript, since I was
getting ghostscript errors, but that wasn't possible. I tried to install
TrueType Fonts, but there was no debian package found with adminmenu.

I transferred the afm files (The "PostScript" fonts,
eg Times-Bold.afm) from the caldera box to the libranet box, and that
fixed things up.  man convert has changed a bit between versions. It
now says that -pointsize will affect all types of fonts and you can
also tag fonts with a prefix.  I tried this out with X fonts
but the font size wasn't affected by the -pointsize parameter.

So, if you want to be able to control font sizes with convert, the only
way I have found is with "postscript" fonts. The nice part about this is
that it seems simple.

Joel


On Sun, Oct 13, 2002 at 02:22:58PM -0400, Joel Hammer wrote:
> 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.
> 

> 


More information about the Linux-users mailing list