HOW TO
This article was contributed by Esri UK.
The instructions provided describe how to use dynamic values of font properties (font type and size) in a VBScript label expression.
Right-click the layer in the Table of Contents and select Open Attribute Table.
In the attribute table, click the table options button and select Add Field.
Code:
"<FNT name='" & [FontType] & "' size='" & [TextSize] & "'>" & [Label] & "</FNT>"
Note:
Make sure that all of the single and double quotes (' and ") are included. Otherwise, there may be errors or labels are not displayed properly.
Note:
The label expression can be verified by entering the following sample test string in the Expression text box and clicking Verify.
Code:
"<FNT name='Arial' size='10'>ABC</FNT>"
Note:
Make sure that the font type(s) chosen are installed on the machine. Otherwise, the labels may not display or may display incorrectly using a substitute font type.
Article ID: 000011537
Get help from ArcGIS experts
Download the Esri Support App