line height multiline text

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

The line height is determined by the font metric. You could of course add a blank line otherwise you would need to render one line at a time and manually specify the offset of the text within the image.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

Note that the hight of the font is different to the line spacing the font uses.
The line spacing is supossed to be determined solely by the pointsize of the font. That is actually what pointsize means! The hight of the font itself
is a graphical determination. That is whay you can get some fonts that look very small at a 'normal' pointsize.

For details of finding the various font metrics from the command line
see
http://www.cit.gu.edu.au/~anthony/graph ... #font_info

A more direct method is available from the program API's.
Does anyone have a small program to do this?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply