PicoVector custom fonts for micropython 1.20.5 update

Lol. I was able to figure out how convert the fonts from otf/ttf to af in windows using the alright-font library.

This is how I did it.

  1. Download the Alright-Fonts script from Alright-Fonts-Git. Extract, and within the main folder, create a new folder called “fonts”. Add your fonts to this folder. I downloaded some free fonts from Da Font

  2. Download and install latest python for windows from the microsoft store or equivalent. Python 3.11 - Official app in the Microsoft Store

  3. Open CMD and navigate to the downloaded Git folder using (in my case)
    cd D:\Downloads\Tufty\alright-fonts-main

  4. Type in the command
    python ./afinate.py --font ./fonts/mogula.otf --quality high mogula.af

Note: I renamed the afinate script to afinate.py in the main folder. mogula.otf is a font i downloaded. “mogula.af” at the end of the command is the output name which gets stored in main.

  1. If the script doesn’t run, and says that some “XYZ” module is missing, then simply go to cmd, type pip install MODULENAME.

In my case I had to install the following libraries for the script to work
pip install freetype-py
pip install simplification

1 Like