I want to make labels automatically smaller so they fit within the polygons. The biggest font-size is 12 and I want to decrease the font-size to be restricted to the boundary of the polygons.

There is a time consuming option using the field calculator by using the polygons area field. Is there another way like using a plugin or similar to reduce the font-size automatically?

enter image description here

  • have you found any workaround for this problem ? – geogeek Sep 17 '15 at 13:38
  • You can make the font size constant in metres rather than points, so it will scale with the map. In Layer Styling, select Metres at Scale instead of Points.

  • You can also make the size in points (or metres) a function of polygon area, using an expression.

    The polygons below are 10000 square km on the outside, and smaller in the middle of the map. The expression for the size (metres at scale) was simple:


    A more complex formula may be useful.

enter image description here

Zoomed in, it scales with the map:

enter image description here

You can base the font size on the area of the polygon.


Not sure if you have already tried this but you can edit the placement of your labels:

Layer properties > Labels > Placement

Select Offset from centroid and choose the whole polygon and the centre quadrant.

Layer properties label

Unless you also edit the Scale-based visibility in the Rendering section (Layer properties > Labels > Rendering), the labels will constantly appear at the same size when zooming in or out which may result in labels exceeding the perimeters of the polygon.

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.