There are several places in mods where you may want to display text and you probably want to control the formatting (like the color, font, etc.). For example, you may create a GUI for a custom lore book, or you might want to display some response to a custom command.
Example #1: Making Rainbow-Colored Text
Here is a method I use to create rainbow colored text. Hopefully it is self explanatory. Basically I count through the letters in the input string and cycle through the colors of the rainbow.
Example #2: Dynamic Formatting (Gold Shimmer Effect)
It is possible to have the formatting change over time to create an "animation" effect. In this example, the text will be a gold color that will have a shimmer move through the text occasionally.
Create Web-Linked Clickable Text
Thanks to Choonster for this tip.
You can either use ITextComponent.getStyle().setClickEvent on the text component to make the whole text clickable with whatever action you want or you can use ForgeHooks.newChatWithLinks, which will parse a String for URLs and make them clickable.
Using A Custom Unicode Font
Thanks to Matryoshika for this tip.
To use a custom font, you need to extend FontRenderer and override the FontRenderer#renderUnicodeChar() method.
The actual font should be added to the game as a PNG file; The ResourceLocation of said file is used when instantiating your own FontRenderer.
You should instantiate it as final inside your proxy, and call the FontRenderer from your proxy whenever you need to use it.
To use this different font, you merely use the stored FontRenderer instance instead of calling Minecraft#fontRenderer like usual (or the FontRenderer given to you if that's the case), and draw the text with FontRenderer#drawString() or any of the other drawing options.
For an example, look at AbyssalCraft's source, as they use the Aklo font to obfuscate some text.