flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatLabelUI.java
static void updateHTMLRenderer( JComponent c, String text, boolean always ) {
		if( BasicHTML.isHTMLString( text ) &&
			c.getClientProperty( "html.disable" ) != Boolean.TRUE &&
			needsFontBaseSize( text ) )
		{
			// BASE_SIZE rule is parsed in javax.swing.text.html.StyleSheet.addRule()
			String style = "<style>BASE_SIZE " + c.getFont().getSize() + "</style>";

			String lowerText = text.toLowerCase();
			int headIndex;
			int styleIndex;

			int insertIndex;
			if( (headIndex = lowerText.indexOf( "<head>" )) >= 0 ) {
				// there is a <head> tag --> insert after <head> tag
				insertIndex = headIndex + "<head>".length();
			} else if( (styleIndex = lowerText.indexOf( "<style>" )) >= 0 ) {
				// there is a <style> tag --> insert before <style> tag
				insertIndex = styleIndex;
			} else {
				// no <head> or <style> tag --> insert <head> tag after <html> tag
				style = "<head>" + style + "</head>";
				insertIndex = "<html>".length();
			}

			text = text.substring( 0, insertIndex )
				+ style
				+ text.substring( insertIndex );
		} else if( !always )
			return; // not necessary to invoke BasicHTML.updateRenderer()

		BasicHTML.updateRenderer( c, text );
	}
/**
	 * Checks whether text contains HTML tags that use "absolute-size" keywords
	 * (e.g. "x-large") for font-size in default style sheet
	 * (see javax/swing/text/html/default.css).
	 * If yes, adds a special CSS rule (BASE_SIZE) to the HTML text, which
	 * re-calculates font sizes based on current component font size.
	 */
Checks whether text contains HTML tags that use "absolute-size" keywords
for font-size in default style sheet
.
If yes, adds a special CSS rule (BASE_SIZE) to the HTML text, which
re-calculates font sizes based on current component font size.
Checks whether text contains HTML tags that use " absolute - size " keywords for font - size in default style sheet . If yes adds a special CSS rule ( BASE_SIZE ) to the HTML text which re - calculates font sizes based on current component font size .
static void updateHTMLRenderer( JComponent c, String text, boolean always ) {
		if( BasicHTML.isHTMLString( text ) &&
			c.getClientProperty( "html.disable" ) != Boolean.TRUE &&
			needsFontBaseSize( text ) )
		{
			String style = "<style>BASE_SIZE " + c.getFont().getSize() + "</style>";
			String lowerText = text.toLowerCase();
			int headIndex;
			int styleIndex;
			int insertIndex;
			if( (headIndex = lowerText.indexOf( "<head>" )) >= 0 ) {
				insertIndex = headIndex + "<head>".length();
			} else if( (styleIndex = lowerText.indexOf( "<style>" )) >= 0 ) {
				insertIndex = styleIndex;
			} else {
				style = "<head>" + style + "</head>";
				insertIndex = "<html>".length();
			}
			text = text.substring( 0, insertIndex )
				+ style
				+ text.substring( insertIndex );
		} else if( !always )
			return; 
		BasicHTML.updateRenderer( c, text );
	}
static void updateHTMLRenderer ( JComponent c , String text , boolean always ) { if ( BasicHTML . isHTMLString ( text ) && c . getClientProperty ( "html.disable" ) != Boolean . TRUE && needsFontBaseSize ( text ) ) { String style = "<style>BASE_SIZE " + c . getFont ( ) . getSize ( ) + "</style>" ; String lowerText = text . toLowerCase ( ) ; int headIndex ; int styleIndex ; int insertIndex ; if ( ( headIndex = lowerText . indexOf ( "<head>" ) ) >= 0 ) { insertIndex = headIndex + "<head>" . length ( ) ; } else if ( ( styleIndex = lowerText . indexOf ( "<style>" ) ) >= 0 ) { insertIndex = styleIndex ; } else { style = "<head>" + style + "</head>" ; insertIndex = "<html>" . length ( ) ; } text = text . substring ( 0 , insertIndex ) + style + text . substring ( insertIndex ) ; } else if ( ! always ) return ; BasicHTML . updateRenderer ( c , text ) ; }
Checks whether text contains HTML tags that use "absolute-size" keywords
 (e.g.
Checks whether text contains HTML tags that use " absolute - size " keywords ( e . g .
// BASE_SIZE rule is parsed in javax.swing.text.html.StyleSheet.addRule() // there is a <head> tag --> insert after <head> tag // there is a <style> tag --> insert before <style> tag // no <head> or <style> tag --> insert <head> tag after <html> tag // not necessary to invoke BasicHTML.updateRenderer()