Select to view content in your preferred language

Easier Text Formatting

1075
2
04-06-2023 11:23 AM
Status: Open
Labels (1)
NormBetland
Regular Contributor

I've seen a few ideas supporting this same request, but both requests were more than a decade old. 

What I think would be brilliant is the ability to easily format text in Pro in the same way that we are able to do in common software programs like Microsoft Office, where you highlight the portion of the text you want to format and then click buttons, rather than try to add properly formatted tags.

I've spent over an hour trying to track down the proper tags for a multi-line, multi-font label in ArcGIS Pro. Multiple unhelpful Google searches later I finally found the right tags and formatting, but new issues with the labels suddenly surfaced. I'm not a programmer or a coder. It's frustrating to spend so much time trying to get tags just right and in the right order to make a label.

2 Comments
JesseWickizer

One helpful tip I can offer is to work out the formatting you like with a sample text element in a layout. In layout view, double-click the text element to perform inline editing and edit parts of the text using the Text tab on the ribbon with formatting changes. Then after clicking outside the text element, formatting tags will be inserted into the Text input box on the Element pane.

JesseWickizer_0-1680806932499.png

 

<FNT name="Comic Sans MS" style="Italic" size="28"><CLR red="0" green="92" blue="230" alpha="100">Hello</CLR>
<FNT name="Papyrus" style="Regular" size="40">World</FNT></FNT>

 

Then use that formatted sample text to create a label expression, swapping out the sample text with the appropriate fields. It needs to be edited a bit to work with the label expression parser:

  • Surround the blocks of text formatting tags in single quotes, and append them to the fields . 
  • Add forced line breaks using TextFormatting.NewLine Arcade constant.

Here's the above layout text sample modified for use with 2 separate fields that replace Hello and World from the sample text:

 

JesseWickizer_2-1680807507036.png

 

'<FNT name="Comic Sans MS" style="Italic" size="28"><CLR red="0" green="92" blue="230" alpha="100">' + $feature.Park_Name + '</CLR>' + TextFormatting.NewLine +
'<FNT name="Papyrus" style="Regular" size="40">' + $feature.Category + '</FNT></FNT>'

 

For others seeing this, here is the ArcGIS Pro help page that lists all the text formatting tags: Text formatting tags

KateDoughty1

While rectangle text allows resizing without changing font size and allows columns, I think it would super helpful to have text formatting tag for signifying new column.