I have some Chinese labels to display on a map and I want them to be vertical, as the picture shows.
In another word, I want to rotate the label while keeping each character upright. How could I achieve this?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
If you are using QGIS 3.10 or later, set the orientation to vertical in the
Labels > Formatting.
See also the Visual changelog.
For younger than QGIS 3.10 versions, e.g. QGIS 3.4 open
'Layer Properties > Labels > Expression Dialog'
'Function Editor' create a new function with such code:
from qgis.core import * from qgis.gui import * @qgsfunction(args='auto', group='Custom') def string_to_list(field, feature, parent): field_as_list = list(field) field_as_list_rot =  for i in field_as_list: field_as_list_rot.append(i + '\n') return field_as_list_rot
'Save and Load functions'
And then slightly adjust the expression that has to be used as this one
regexp_replace() are native QGIS functions
'Apply' and get the result