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

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: 2848
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: ImageMagick incorrectly renders text using BDF font files.

Post by Bonzo » 2017-10-16T14:07:31-07:00

I am not sure Imagemagick supports BDF fonts.

User avatar
fmw42
Posts: 22095
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

Re: ImageMagick incorrectly renders text using BDF font files.

Post by fmw42 » 2017-10-16T15:17:16-07:00

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

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: 22095
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

Re: ImageMagick incorrectly renders text using BDF font files.

Post by fmw42 » 2017-10-16T16:17:00-07:00

The ImageMagick developers will need to look into this. Perhaps the font glyphs are not well define?

User avatar
magick
Site Admin
Posts: 10690
Joined: 2003-05-31T11:32:55-07:00

Re: ImageMagick incorrectly renders text using BDF font files.

Post by magick » 2017-10-16T17:01:10-07:00

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

Post Reply