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?



3 Answers 3


If you are using QGIS 3.10 or later, set the orientation to vertical in the Labels > Formatting.

enter image description here

See also the Visual changelog.



For younger than QGIS 3.10 versions, e.g. QGIS 3.4 open 'Layer Properties > Labels > Expression Dialog'


In '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

Apply 'Save and Load functions'


And then slightly adjust the expression that has to be used as this one


where array_to_string() and regexp_replace() are native QGIS functions

Click 'Apply' and get the result



Using QGIS 3.10 you can actually change the text direction under labels > formatting from horizontal to vertical.

enter image description here

  • What should do those who do not understand Deutsch? =)
    – Taras
    Commented Mar 30, 2020 at 11:54
  • 1
    Since the options are always ordered the same, I think the red box is sufficient guidance for everyone else.
    – Erik
    Commented Mar 30, 2020 at 11:57
  • lol ... that's an answer ... ach ...
    – Snaileater
    Commented Mar 30, 2020 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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