Is it good practice to use HTML to specify height of button text?

I am done adding enhancements to an existing module, and am in the “cosmetic cleanup” phase. Specifically, I am trying to make the icons on the Main Map toolbar menu to have the same height.

I could create (or copy) graphic image files for all of the icons on that toolbar, giving them the same height. However, I would prefer those buttons to use text, rather than images, to describe their purpose. I could of course create image files composed of that text, but in an attempt to save effort, I have investigated using HTML to define the color and size of the Button text. Here is an example:

This results in an “Automation” button which has a height conforming to the other toolbar buttons, as desired:

Note that the height as defined within the HTML (5) does not seem to be defined in terms of absolute pixels, but is apparently some sort of HTML abstraction. The resulting height is as desired in my particular case, but is that something that I can (or should) rely on to work in the general case? I worry about how the module would render that button on other Operating Systems or future versions of Vassal, which might be bundled with different versions of Java.

Any advice on general best practice for defining button icons with uniform height on a toolbar would be welcomed.

Cheers,
Jim Hunter.

I recommend against using HTML in UI elements in Vassal 3, as this overrides what users expect to see in UI elements on their operating system.

As you don’t know how the background of UI elements will appear, you run the risk of choosing colors which make the text illegible. You could also pick font sizes which are too large or too small in comparison with other UI elements.