Text formatting expression not working in Expression Builder of Symbology Pane

451
3
09-27-2021 02:59 PM
Labels (2)
DanielleKulas
Occasional Contributor III

We are trying to italicize the labels for a layer that is symbolized on unique value (scientific name), so that the italics display in the contents pane, and also show up in a map legend (we want to use a longer expression involving other non-italic words so formatting the legend text to italics is not a viable workaround).

I am using the Expression Builder in the Symbology pane and have consulted this ESRI help page  for expression formatting (some end quotations are missing in the examples of that page, btw - Bold Arcade and Bold VBScript). 

The expression builder says that the Arcade is valid but the Contents pane is not respecting the Label Expression: "<ITA>" + $feature.SNAME + "</ITA>"

DanielleKulas_0-1632779312188.png

Is there another, proper way to go about doing this? I read that Tahoma, the default project font, may not support italics but I am getting the same results when I try other default font types. Any advice is appreciated!

 

0 Kudos
3 Replies
curtvprice
MVP Esteemed Contributor

You would have to make sure there is an italic for that font. Try Arial. Another thing to try is Python, if you don't need to work with javascript I would eschew that "circus language", in Python  you can use its excellent string manipulation functions to easily do many things with labels.

I dropped a note to the help page author to fix the trailing quote issue in the help. They read feedback!

0 Kudos
DanielleKulas
Occasional Contributor III

Thanks for your response and for notifying the help page author! We originally started out with Python in the label class builder, but since labels don't drive the legend in layout view we switched to the expression builder in the symbology pane and Arcade is the only Language option there:

DanielleKulas_0-1632831681264.png

Tried Arial alas, same results I've been getting.

0 Kudos
curtvprice
MVP Esteemed Contributor

I'd ask tech support on this. Making sure the font supported italic was my only guess.  The only other thing I can suggest is look at the placement options.