BikeHelmet wrote:Getting rid of the -stroke option helped a little bit.
Adding +antialias got rid of the blurring, but the text is still illegible at small point sizes. Pointsize 9 is actually a bit better than 10 for CourierNew, but it's hardly readable compared to how it appears in Windows or on this website. (Code box)
So far what I'm left with is resizing, drawing the text huge, then resizing small again?
The stroke is making the font thick as you noticed.
But the thin fonts really do need to have anti-aliasing enabled so as to get good 'sub-pixel' handling of the font. Without it the font also becomes blocky and unreadable at low pointsizes.
Their are however bitmap fonts (pure black and white) that can be used, and some of these are in TTF font files, but only work at a very specific point size. Any other size and it is no longer a bitmap. The problem with may font finding sites is while they have such fonts, they don't provide the other information needed to make the font work as the author intended.
The above 'font text image' was part of a search for readable ultra tiny fonts, and was generated by code I added to the 'ttf image' reading mode of the TTF coder. However my changes to generate the above image was removed!! Arrrggghhhhhh!
Here is the results of that search (using fonts I had, or downloaded thinking they may do the job. This code was extracted from a 'text file thumbnailer' I wrote. The values 'font=' is the font name, and 'p=' the point size.
Code: Select all
#font=Arial p=6 # 6,9 good 7,8 not so good, proportional
#font=ArialN p=7 #
#font=CourierNew p=6 # very light, needs auto-level
#font=CourierNewB p=6 # Best fixed width font at most sizes!
#font=PC p=7 # thinner and works better!
#font=BitstreamVeraSansMono p=6 # not very good
font=LiberationMono p=6 # quite good
#font=LucidaTypewriter p=6 # quite good, 6 better
#font=LucidaTypewriterB p=6 # bolder
#font=Terminal p=6 # 6 good 8 nice (more line spacing)
#font=PixelMix p=5 # 5 works 6 bad 7 overflows lines
#font=ETBT6001 p=6 # very clear monospaced (6pt ideal)
#font=CoolThreePixels p=4 # a little too small (5pt ideal)
#font=7px4bus p=7 # yuck 'a' (7pt ideal)
#font=Crystal p=6 # very near proportional (not quite)
#font=Verdana p=7 #\
#font=LucidaConsole p=6 # > proportional fonts (clean when small)
#autolevel='-auto-level' # for CourierNew, or PC
As you can see my current choice is LiberationMono at 6 point
The
-auto-level is used to make the font clearer when I render it black on white. After rendering to a image I
-compose multiply the generated 'font image' onto a background. To compose a white on black text onto a background use
-compose screen.
See IM examples, Mathematical composition
http://www.imagemagick.org/Usage/compose/#multiply
I probably should write a script to display all the above fonts (and any other possibilities I may find) into the one image (with normal text index listing to the side). And a user selectable text 'test' string. But I never got to that stage, so my selection may not be 'the best'.
The other way, Which I often use for 'GIF diagram images' is to draw the image at a larger scale, then resize smaller. The font becomes small and sill readable, and the image results are finer. But it is unlikely to be better than finding a font that renders properly directly the smaller size.
Anyone else have a favourite 'readable tiny font'?
NOTE: photos are typically LARGE (pixel wise) so you can get 'photo quality' results when printed (at a cheap DIY photo lab) ASIDE: I don't think it is worth paying for personal photo printers myself.
Basically this means a 'tiny font' will typically disappear as a 'fuzzy line' along the bottom edge of the photo when displayed, or printed, unless you magnify that part of the image. That same information can also be stroed in the image file itself using profiles (EXIF, or more specialized IPTC profiles).
See Profiles
http://www.imagemagick.org/Usage/formats/#profiles
On the other hand 'tiny fonts' is a ON THE IMAGE so is not as simple to delete without cropping. But it is still easily removed.