ImageMagick incorrectly renders text using BDF font files.

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
tim.rawlinson
Posts: 2
Joined: 2017-10-16T12:25:20-07:00
Authentication code: 1151

ImageMagick incorrectly renders text using BDF font files.

Post by tim.rawlinson »

I'm trying to render text using the following command-line:

Code: Select all

convert -font unifont.bdf -pointsize 16 label:"Test" test.png
The text renders but the characters are all overlayed rather than advancing along the x-axis.
The BDF font in question came from here: http://unifoundry.com/pub/unifont-10.0.06/font-builds/. I have tested with other BDF fonts and the result is the same. Non-BDF font files work perfectly.

Is there something I should be specifying on the command-line or is this a bug? Thank you!

- Tim Rawlinson
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: ImageMagick incorrectly renders text using BDF font files.

Post by Bonzo »

I am not sure Imagemagick supports BDF fonts.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: ImageMagick incorrectly renders text using BDF font files.

Post by fmw42 »

Typical fonts that ImageMagick can use are:

| True Type Fonts (ttf)
| Ghostscript Fonts (afm)
| Open Type Fonts (otf)
tim.rawlinson
Posts: 2
Joined: 2017-10-16T12:25:20-07:00
Authentication code: 1151

Re: ImageMagick incorrectly renders text using BDF font files.

Post by tim.rawlinson »

BDF is supported by freetype, which I believe ImageMagick uses. Code for the driver appears to be here: https://github.com/ImageMagick/ttf/tree/master/src/bdf? It can certainly load the font file as the correct characters do appear.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: ImageMagick incorrectly renders text using BDF font files.

Post by fmw42 »

The ImageMagick developers will need to look into this. Perhaps the font glyphs are not well define?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: ImageMagick incorrectly renders text using BDF font files.

Post by magick »

Thanks for the problem report. We can reproduce it and will have a fix in the near future.
Post Reply