Page 1 of 1

ImageMagick incorrectly renders text using BDF font files.

Posted: 2017-10-16T12:32:51-07:00
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

Re: ImageMagick incorrectly renders text using BDF font files.

Posted: 2017-10-16T14:07:31-07:00
by Bonzo
I am not sure Imagemagick supports BDF fonts.

Re: ImageMagick incorrectly renders text using BDF font files.

Posted: 2017-10-16T15:17:16-07:00
by fmw42
Typical fonts that ImageMagick can use are:

| True Type Fonts (ttf)
| Ghostscript Fonts (afm)
| Open Type Fonts (otf)

Re: ImageMagick incorrectly renders text using BDF font files.

Posted: 2017-10-16T15:51:39-07:00
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.

Re: ImageMagick incorrectly renders text using BDF font files.

Posted: 2017-10-16T16:17:00-07:00
by fmw42
The ImageMagick developers will need to look into this. Perhaps the font glyphs are not well define?

Re: ImageMagick incorrectly renders text using BDF font files.

Posted: 2017-10-16T17:01:10-07:00
by magick
Thanks for the problem report. We can reproduce it and will have a fix in the near future.