private static String createHTMLSpacerString(String htmlContent, String otherHTMLContent) {
		// unfortunately, to get the displayed widths, we have to have rendered content, which
		// is what the JLabels below are doing for us
		JLabel label1 = new GDHtmlLabel("<html>" + htmlContent);
		JLabel label2 = new GDHtmlLabel("<html>" + otherHTMLContent);

		int maxPixelWidth =
			Math.max(label1.getPreferredSize().width, label2.getPreferredSize().width);
		FontMetrics fontMetrics = label1.getFontMetrics(label1.getFont());
		StringBuilder bigBuffy = new StringBuilder();
		String HTMLSpace = "&nbsp";
		int invisibleCharCount = HTMLSpace.length();
		for (int i = 0; i < 150; i++) {
			bigBuffy.append(HTMLSpace);

			// this is the width of *displayable* characters
			int width = SwingUtilities.computeStringWidth(fontMetrics, bigBuffy.toString());
			int currentPixelWidth = width / invisibleCharCount;
			if (currentPixelWidth >= maxPixelWidth) {
				break;
			}
		}

		return bigBuffy.toString();
	}
Compares the two HTML strings to find the widest *rendered* text and then creates
an HTML string of spaces that is wide enough to represent that width.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/DataTypeSynchronizer.java