7

I tried to make a the label caption size adjusted relatively to the map scale. It worked, more or less, when I set the size into map unit. I set them to 0.1, and when I zoom out the caption size get smaller enter image description here And when I zoom in it get bigger enter image description here

However I cannot understand what is the "map point" logic, or in other words how does it work. And one more question: is there a better way to adjusted the caption size and force them to always be inside the polygon?

8

The points unit represents a constant size for the label on the screen, more or less the same as millimeters or pixels. Regardless of the map scale, a label of 10 points will be 10 points tall (let's ignore font sizing subtleties). It is your responsibility to hide the labels - or use a different size - beyond given map scales. For instance, labeling continents, you probably will keep the same size all the time, though if you label streets you will not want a size 10 label at any scale.

The map unit is the opposite. A label of size 1 (degree, meters, you name it) will always be of size 1 on the map, so the closer you are to scale 1:1 the bigger it is on your screen, and the more you zoom out the smaller the label is, still on your screen.

If you want finer control of a label that gets smaller as you zoom out and bigger as you zoom in, you would have to select the points unit, so the reference size is always the same on the screen, but you would also dynamically set the size in function of the scale, something like 10000000 /@map_scale (of course it depends on your data and you may want a non-linear scaling).

Label by map scale

To answer you second question, you can instruct QGIS to hide labels that are not fully contained in their feature

Label inside feature

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.