DEV Community

Cover image for Android's `monospace` font is not monospace
Maxim Saplin
Maxim Saplin

Posted on

Android's `monospace` font is not monospace

Few years ago I have discovered the hard truth of Android's default monospaced font not having all the characters of the same width (which is the key attribute of a monospaced font). Spaces are of a difference size.

At the time I created a Xamarin.Forms ASCII chart control. Since then I used to bring own fonts with my apps, be it Xamarin, Flutter or Web. IBM Plex Mono is a great monospaced font I've used most of the time.

Yet this deficiency keeps chasing me:) One of the recent examples is ASCII diagram I have built for one of OS projects. Apparently GitHub's code block viewer doesn't attempt to override the system's default font on Android:

Image description

Same holds for pub.dev. Apparently it is not often that site owners care about monospaced fonts on Android and ASCII graphics rendering :)

Here's a few links on the subject: 1, 2, 3, 4

Top comments (0)