0

My map has labels, which usually should break after the 14th character using "wordwrap":

wordwrap(name,14)

But sometimes I need to suppress the wraping. So I need to use a "No-break space" - is there one?

  • I'm not sure this has anything to do with Postgis? – John Powell Feb 25 '15 at 12:53
  • Not? I dont know. – MAP Feb 25 '15 at 14:45
  • wordwrap(string, wrap_length, [delimiter_string]) is a QGIS 2.4 feature – Mike T Feb 26 '15 at 23:03
1

My workaround for this is to add an attribute field "WRAP" with a default value of something very high like 100, and then in place of the wrap length I use the value of that field. So: wordwrap("NAME","WRAP")

When I want a label to wrap I just change its "WRAP" attribute to the length I want. Of course you could set a low default value so that most of your labels wrap, then only change the ones you want to suppress.

There is a non-breaking space, by the way (on Mac it's option-space), but it does not seem to affect label wrapping. However, you can use it to bypass the word spacing value specified in label settings. This is helpful if, for example, you have a feature with a two-word proper name that you want grouped together, but separate from the feature descriptor. Thus: St George River or Elkton - White Marsh Road.

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.