Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

Is there any way to have multiple text formats in a single qgis label? I am making a map that shows mountain summits. Many of these summits have more than one name and I would like to show each name in a label and have each name rendered with different formatting to show what type the name is.

For example, summits, in the US, often have an "official" name from the GNIS database, a name as shown on a 1:24000 USGS topo map (often just the elevation of the summit), and a local nickname. I would like to be able to have a label that renders each name in a different type font and/or font size.

share|improve this question

marked as duplicate by underdark May 3 '15 at 10:44

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

If you want to do more than just concatenate the different names - different fonts, etc - then you'll need to add the layer twice, and label each one differently. The second copy of the layer can be with no style so only the labels appear. – Micha Jun 24 '13 at 13:50
@Micha: Conside converting your comment to an answer! – AndreJ Jun 24 '13 at 15:10
I tried adding the layer twice, but the result is messy. The two labels for each summit don't get placed consistently in relation to each other. Perhaps to get what I want it would be necessary to be able to embed some sort of markup language in the label text. – John Yates Jun 25 '13 at 4:01
You can displace the labels in the Layer tab of the properties window. So shifting the labels of one of the layers a bit in the +x direction, and the other in the -x direction might get you something usable. – Micha Jun 25 '13 at 6:50
I need to have the labels have some uniformity in their appearance. Some of them will have three different sub-labels, and it would look very messy if the label placing logic treated them independently from each other, especially as they will be in the vicinity of numerous contour line labels. – John Yates Jun 25 '13 at 19:38

Many methods to do this, here are two examples. Open the field calculator:

Layer Attributes --> Label Options

For the positioning of the two labels: Add an expression to the main label expression ("Label this layer with") that places the nickname below the GNIS name.

"GNIS" || '\n' || "NICKNAME"

To change each peak / nickname's font sizes: Add an expression to the font size ("Size") element.

share|improve this answer

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