Supported Fonts
The code-to-vid tool relies on the fonts installed on your host system. Because this tool is designed for code, Monospaced fonts are required for proper alignment.
Recommended Fonts
Section titled “Recommended Fonts”The tool is currently configured to use DejaVu Sans Mono as an example. Here are other reliable options:
| Font Name | Style | Note(s) |
|---|---|---|
DejaVu Sans Mono | Clean/Standard | Default for this project |
Liberation Mono | Sharp | Standard on Debian/Ubuntu |
Noto Sans Mono | Modern | High readability |
DSans Code | Modern | Created by dmx3377 |
Courier New | Classic | Fallback font |
How to check available fonts
Section titled “How to check available fonts”To see which fonts your system can use, run the following command in your terminal:
fc-list : family | grep -i mono
Changing the Font
Section titled “Changing the Font”To switch fonts, open internal/renderer.py and modify the font_name variable in the ImageFormatter section:
formatter = ImageFormatter( style='monokai', font_name='DejaVu Sans Mono' # Change this string!)You might change it to DSans Code, for example:
font_name='DSans Code'
info NOTE: If you choose a font that isn’t installed on your machine, the renderer will fail with a Font not found error.