Yes, using a symbol font is a good solution, @Mike_Gray, and works well, especially when you need to embed an icon in the middle of a text block.
However, finding, installing and testing/tweaking can sometimes make it less than simple–especially if you also need to set up web font mapping, for instance to make it work on mobile devices. If you need to use a custom icon, or one with multiple colors, states, photo image, etc. a different approach must be taken.
Recently, there was a thread where someone needed to make a repeater resize on text changes (Not fitting with “Fit to Content in HTML”), and the core issue was how to determine the exact width of proportional font text. It turns out there is an easy way to get this with javascript, and it can be easily injected with:
Where “newWidth” is a global variable and “myText” is the name of your widget containing the text.
See this .rp file for an example of using an image of a pencil that always gets moved 10px to right of text. Clicking the pencil will bring up an input field for “Enter your name” where you can enter any length of text to test it out.
ChangeTextWidgetSize.rp (58.5 KB)