Draw with your mouse, press A to see a preview of your font, and press B to print the current font file to the console. Make your own copy of the project so you can see the console (to export fonts), kinda save progress, and switch which font you are editing.
Exporting fonts
Press B to print your font data to the console. You have to make your own copy of the project to be able to copy/paste the exported font from the console. The font files can get a little long, so sometimes they are in the console as two separate blocks of code. Just make sure to copy both! This really only happens with font8, because font5 has fewer characters.
Saving progress
Fonts are not auto-saved (yet), so if you restart the console you will lose your progress. You can copy the font from the console and follow the āview a custom fontā instructions in the comments of the project (line 9) to view your own font, which will effectively save it. That way, you can āsaveā every so often by copying your current progress into there. Iāll be adding autosave and maybe a font menu later, if I have enough motivation.
Replacing built in fonts
You can actually replace the built in font files with your own fairly easily in JavaScript, which lets you change the font of things like the Splash and Show Long Text functions! Maybe Iāll make a small extension to do that in blocks, but in typescript you use:
image.font8.data = hex`[font data]`
Editing font5
Anywhere you can draw should show up if you replace the built in font8 file with one you made, but if you are editing/replacing the font5 file, not every editable space will be visible when Makecode renders the font because font5 specifies that its characters are smaller. (Font5 is used in some weird and niche places, usually where the font needs to be smaller.)
Nerd stuff
Youāll notice there is a two column gap between each character. These two columns are the binary representation of the character code, which tells the text renderer which character is which. Most characters are single-byte characters, but if you scroll down youāll see some using that second column. For obvious reasons, these cannot be edited. Maybe Iāll add a way to add characters later, which could be interesting.
Future plans?
Right now you can only edit font8 and font5 because their size and data structure are the same, so you canāt edit font12 yet or make other sized fonts, but Iāll probably figure that out soon. I know Richard made a tool to do this, but I made this more for the logical challenge than for convenience or anything. I really enjoyed making this, and my next challenge is rendering and editing the much bigger font12, which looks pretty cool.
Have fun!
Feel free to use those custom fonts I made. There are more instructions in the project for looking at those on line 18.