Sitemap

Fonts are not just for style; they can enhance the user experience of the app.

6 Smart Font Tricks to Transform Your Jetpack Compose UI

Let’s discuss six font tricks that can enhance the codebase.

--

Press enter or click to view image in full size
Photo by Fabian MĆøller on Unsplash

Not a Medium Member? ā€œRead For Freeā€

In this article, we will discuss six font tricks that can immediately improve your UI.

1. Use a Custom Font

The system font is good, but using a custom font can genuinely enhance the app's looks.

Using custom fonts in Jetpack Compose is simple and straightforward. First, place all custom fonts in the font directory and use them like this:

val montserrat = FontFamily(
Font(R.font.montserrat_thin, FontWeight.Thin),
Font(R.font.montserrat_light, FontWeight.Light),
Font(R.font.montserrat_extra_light, FontWeight.ExtraLight),
Font(R.font.montserrat_normal, FontWeight.Normal),
Font(R.font.montserrat_medium, FontWeight.Medium)…

--

--

Jayant KumaršŸ‡®šŸ‡³
Jayant KumaršŸ‡®šŸ‡³

Written by Jayant KumaršŸ‡®šŸ‡³

Jayant Kumar is a Lead Software Engineer, passionate about building modern Android applications. He shares his expertise in Kotlin, Android, and Compose.

No responses yet