In order to provide as much language support in a single font, we looked at quite a few different ones. We decided to choose one of the Google Noto fonts. The specific font is the Noto Sans Display font due to its ability to support over 500 languages through its support of the Latin, Greek, and Cyrillic character sets. It is called a Noto Font because the goal of the font was to avoid needing to display the placeholder blocks that represent the missing characters. These placeholder blocks are referred to as "Tofu", so the name of the font is short for No Tofu.
If you would like to make your own custom font, be sure to check out our Custom Fonts for CircuitPython Displays guide. For the fonts in this guide, we used otf2bdf.
For the basic Badge, we have a simple Hello, My Name Is Blinka. You can change the name "Blinka" to whatever your name is.
But what if your name has non-English characters? If your name has accents, that's easy since the Noto font has all of the accented characters. But let's say Blinka happened to be from Greece and had Greek characters. CircuitPython will handle this with no problems.
That's because CircuitPython handles unicode. In this case since Blinka isn't normally composed of Greek characters, we chose some equivalent Greek characters to demonstrate the badge's ability to display Greek. But what about Cyrillic characters like Russian? Yes, no problem.
Ok, so we know we can write out the name in many languages just with these three character sets. If you have a name that uses another character set such as Arabic, Thai, Korean, Japanese or Chinese, there are plenty more font sets available from Google. In fact they have a page where you can type in your language and it will show you the fonts they have available in that language.
Of course you aren't limited to these fonts. You may find other font sets are much smaller and fit into the memory space on the PyBadge better. Here's an example of a Japanese Font with only katakana characters.
CircuitPython is even capable of handling fonts that should display Right to Left, with a small caveat. You will need to reverse the string before displaying it. You can easily do this with the following line of code.
NAME_STRING = ''.join(reversed(NAME_STRING))
Afterwards, it should display similar to this name tag that displays Blinka in Hebrew.
Changing the Hello Message
What if you would like to change the Hello message on the Badge? Yes, you can easily do that. Let's say we have a French Blinka.
We can easily change the labels to say the equivalent message in French.
Now let's take a look at some other customizations we can do to the badge on the following pages.
Page last edited March 08, 2024
Text editor powered by tinymce.