I'm using a text box in the print composer (QGIS 2.16). If I write more then one line, how can I set the line spacing between the lines?


I don't think you can - not with a text box at least. (QGIS 2.18.3) By text box, I'm assuming you mean 'label'

But you can use an HTML frame, and a bit of CSS instead.

This will give you more typographic control, and let you define line spacing in pixels, mm, ems etc.

Something like this, which double-spaces lines. You can use the line-height css style to change the spacing...

    p {
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
  • 1
    Great answer, I almost always use HTML in the composer. One thing I would add: you can also just use 'label' and select 'render as html'. The HTML frame is a newer addition to QGIS, and is in my experience more buggy. (Although much more powerful with custom CSS / extra frames etc) Jan 27 '17 at 1:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.