I'm working with QGIS 2.16. When I create a map, I often use a white buffer around text of various size. The thing not evolving is the buffer size : the rendered text is sometimes a bit strange visually and the buffer is looking like it's not the same size on every text (even if it is if you mesure it). How to avoid this visual effect ?


1 Answer 1

  • Create a data defined field (Font_size) and set the font size in the label properties to be dependent on this field.
  • Create a virtual field (VRT_Buffer) with the following formula : to_real( "Font_Size") /15
  • Set the buffer size property to point towards this virtual field :

Buffer settings

You get a text with font size depending buffer, changing interactively when you change the font size with the label tools.

text with variable buffer

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.