One of the elements of visual design, being Typography — the design of a typeface or text element— plays a significant role in designing a functional and easy to use User Interface (UI) that in turn translates to a positive User Experience for users.
Visual Hierarchy can be used to create context, help users gain clarity on information they're accessing through the UI.
a. Font Weight: the font weight of a typeface creates contrast between text elements in a UI component. This contrast allocates importance or hierarchy to the information. For example using a Semi bold or Medium font weight for the headline and a Regular font weight for the body creates a drastic difference between the elements.
b. Font Size: using the Typography scale to increase the height of the text. In doing so, there's a clear difference as a text with a larger font size looks larger than that with a smaller font size. Users will automatically assign importance to the larger text.
c. Font Family: these are categories that fonts fall under including Serif, San Serif and Script. Because of their designs, these different font families have been assigned roles in typography, that play a role in font legibility.
d. Font Colour: colour plays a big role in visual heiracy. A designer can assign roles of importance to text in a component without altering the font size or weight. This can be done by changing the colour of the text. In designing a text, giving the important text a darker or higher contrast colour against the container’s background, it creates a sense of importance around the text compared to a text with a lower colour text to background contrast ratio.