This brief text explains how to use some custom symbols in QGIS expression. Obviously, it applies only to the quoted part, which represents the bits with string.
There are 2 ways of doing it.
The first method uses the char() element, which can give us the desired symbol, letter, or icon. In the case of degrees, it will be (Pic. 1):
18 || char(730)
Considering a few other examples, we could list:
char(730) – degree symbol
char(0176) – bigger degree symbol
char(0163) – the £ symbol
char(0169) – the copyright symbol
char(999999999) – 짿
In total, we have 65535 all special characters available in QGIS! They include various symbols, letters in all languages, and emoticons. Indeed, you can feel seriously overwhelmed by it! It’s rather pointless to draw lots between such a massive list of characters. In fact, I’ve prepared some of them for you, which are available here, but for some of you, these lists might be still not sufficient. When you don’t know what number is assigned to the character you want to attach to your label in expression, then the second method will be tailor-made for you.
You will need to open MS Word and next: Main toolbar -> Insert -> Symbol -> More symbols where you will find the interesting one if not visible in the handy list (last used) appearing right under the Symbol (Pic. 3).
Once your symbol appears on the page, select it and copy (Ctrl + C), then paste it (Ctrl + V) between the quotes (‘ ‘) in your QGIS expression (Pic. 4).
The result will be exactly the same! (Pic. 4).
- Github.com: Encoding issue for special chars in labels
- How to correctly replace a special character into an apostrophe using the replace function in QGIS Field Calculator? The expression below says it is invalid; what’s the correct syntax? Thanks!
- QGIS displays all 65535 Unicode characters in Font Marker symbol selection window
- Github.com: QGIS displays all 65535 Unicode characters in Font Marker symbol selection window
Leave a Reply
You must be logged in to post a comment.