Select to view content in your preferred language

Spaces Randomly Removed in Arcade Labels

1379
5
04-06-2023 11:08 AM
NormBetland
Regular Contributor

Hello, I'm venturing into creating more complex labels that require different styles and text sizes on each line. It took me awhile to find a page that actually walked me through the proper Arcade expression. But now that I've got that figured out, the resulting labels are doing some funky things, mostly that in one area of the map, spaces are randomly removed from the labels.

In the screenshot you'll see the 2 polygons on the bottom have all spaces removed despite a space being specifically included in the expression, as well as spaces in the string in the attribute table. I've tried unchecking the "Remove extra spaces" option in the label panel but that didn't do anything. 

Any ideas or clues as to why this is happening and only happening to certain features?

Tags (3)
0 Kudos
5 Replies
NormBetland
Regular Contributor

So I did a few more things to test it out. I created a new map, added the layer, and then pasted the code into the label pane. No spaces were removed, however the second line used the Tahoma font since that is default. That was to be expected. So I changed the font in the pane to Corbel. Spaces were removed from one polygon after that change. I don't understand why. Then I added the halo setting back in and spaces were removed from a second polygon. When I changed these settings back, the spaces were added back in. Then I changed only the halo, leaving Tahoma as the font, and no spaces were removed.

After trying it with several other fonts, with and without halos, it appears that it may be font specific. 

0 Kudos
avonmoos
Regular Contributor

There's a remove extra spaces option under your expression. Have you tested with it unchecked?

KimberlyDiGiovanni
New Contributor

Where can the option be found? 

0 Kudos
avonmoos
Regular Contributor

Annotation 2023-10-05 142309.jpg

0 Kudos
JesseWickizer
Esri Contributor

There was an issue with the spacing with certain combinations of text formatting tags that has been fixed at ArcGIS Pro version 3.4. This should resolve the missing space between word you were seeing in this label expression.  

0 Kudos