monkeytype/docs/FONTS.md
Seif Soliman 2b43a5f82e
fix(font): 0xProto not working in screenshot (@byseif21) (#6817)
### Description
starting with number seem to cuzes issue, did some hacking idk

---------

Co-authored-by: Christian Fehmer <cfe@sexy-developer.com>
2025-08-04 15:12:38 +02:00

2.4 KiB

Table of Contents

Forking Monkeytype

First, you will have to make a personal copy of the Monkeytype repository, also known as "forking". Go to the Monkeytype repo and then click the "fork" button.

Screenshot showing location of the fork button on GitHub.

Adding Fonts

Once you have forked the repository you can now add your font. Place the font file in ./frontend/static/webfonts e.g. My-Font.woff2.

Note

Your font needs to be in the .woff2 format. Your filename cannot include spaces or start with a number.

Open ./packages/schemas/src/fonts.ts and add the new font at the end of the KnownFontNameSchema list like this:

const KnownFontNameSchema = z.enum(
  [
    "Roboto_Mono",
    "Noto_Naskh_Arabic",
    ...
    "My_Font",

Call it whatever you want but make sure you replace spaces with underscores and the font does not start with a number.

Then, go to ./frontend/src/ts/constants/fonts.ts and add the following code to the end of the Fonts object near to the very end of the file:

export const Fonts: Record<KnownFontName, FontConfig> = {
  ...
  My_Font: {
    fileName:  "My-Font.woff2",
  }

Committing Languages

Once you have created your language, you now need to create a pull request to the main Monkeytype repository. Go to the branch where you created your languages on GitHub. Then make sure your branch is up to date. Once it is up to date, click "contribute".

Update branch: Screenshot showing how to update the fork to match the main Monkeytype repository

Create a pull request: Screenshot showing how to create a pull request to the main Monkeytype repository

Language Guidelines

Make sure your language follows the Language guidelines.