Select to view content in your preferred language

How is white space handled in the arcgis pro labelling engine?

493
1
12-17-2024 12:13 PM
Labels (1)
AlexanderGray
Honored Contributor

I am trying to label features based on multiple fields in a stack way.  I added a python expression to line up and stack the values I want to label on (up to 13 fields.)  I also want to place a marker symbol as a background (like a highway shield)  I have an svg file for the marker.   It works surprisingly well but I am getting caught up in some details.  I am not using maplex and I am placing the symbol over the point.

I use a monospace font so the characters will line up in a predictible way.  The problem I have is blank space (\u0020 or \u00A0) is being treated differently than a character in the label.  The regular space gets trimmed and the no-break space lines up differently on the left...

This is what happens if I use hyphens as a blank space place holder (this is what I want without hyphens):

AlexanderGray_0-1734461868129.png

this is with no break space (\u00A0)

AlexanderGray_1-1734461979868.png

this is a regular space: \u0020

AlexanderGray_2-1734462300170.png

 

 

 

Tags (1)
0 Kudos
1 Reply
JesseWickizer
Esri Contributor

If you use the Maplex label engine, you can choose whether or not to remove extra spaces. If I put the same text into a Maplex label with a monospace font and un-check Remove extra spaces, the spacing will be kept. 

JesseWickizer_0-1740869876220.png

JesseWickizer_1-1740869928297.png

0 Kudos