[{"element_type":"text","content":"\n        \u003cp\u003e... using FontForge\u003c/p\u003e\n\u003cp\u003eBecause CircuitPython uses bitmapped fonts (.bdf) as well as\u003cspan\u003e\u0026nbsp;the binary\u0026nbsp;\u003c/span\u003e\u003cstrong\u003e.pcf\u003c/strong\u003e\u003cspan\u003e\u0026nbsp;format but many free fonts online are in .ttf format, following the \u003ca title=\"Custom Fonts for CircuitPython Displays\" href=\"https://learn.adafruit.com/custom-fonts-for-pyportal-circuitpython-display\"\u003eCustom Fonts for CircuitPython Displays\u003c/a\u003e learning guide I came up with a cheatsheet to quickly take a full font, select only the limited characters I wanted and generate a small .bdf file. As I only do it once in a while if I don't write it down I wouldn't remember. Below is all covered in the above linked learning guide, but I wanted a quick and dirty cheatsheet, so here it is.\u003c/span\u003e\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003e\n\u003cp class=\"p1\"\u003e\u003cstrong\u003eOpen .ttf font file in FontForge\u003c/strong\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp class=\"p1\"\u003e\u003cstrong\u003eSelect characters wanted including space before the “!” (you may need to scroll up)\u003c/strong\u003e. This is important and is missed in the learning guide example screenshot. Without selecting the ASCII 32 spot before the \"!\" character you won't have a way to display a space, so your display willlooklikethis. See first graphic below showing red box of missing space character you want to be sure to select.\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp class=\"p1\"\u003e\u003cstrong\u003eBesides the basics of numbers, letters, and punctuation, be sure to select any others you want.\u003c/strong\u003e I have noticed many .bdf fonts, including CircuitPython's built in \u003cspan\u003eterminalio.FONT, don't include a degree symbol (e.g. 78°F will display as 78F) even though many projects people create include temperature. So grab that symbol plus others that might be useful such as ± as another example.\u003c/span\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp class=\"p1\"\u003e\u003cstrong\u003eEdit -\u0026gt; Select -\u0026gt; invert selection\u003c/strong\u003e (selects everything you \u003cstrong\u003edon’t\u003c/strong\u003e want).\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp class=\"p1\"\u003e\u003cstrong\u003eEncoding -\u0026gt; Detach \u0026amp; remove glyphs…\u003c/strong\u003e (everything you don't want is removed)\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp class=\"p1\"\u003e\u003cstrong\u003eElement -\u0026gt; Simplify -\u0026gt; Simplify\u003c/strong\u003e and click OK on the warning box.\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp class=\"p1\"\u003e\u003cstrong\u003eElement -\u0026gt; Bitmap Strikes Available…\u003c/strong\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp class=\"p1\"\u003e\u003cstrong\u003eIn 3rd field, Pixel Sizes, enter size you want to create.\u003c/strong\u003e For example if you want a 36 pixel font then type \"36\" (the first two fields will auto fill with values). Note that when you create a .bdf file you are only creating a file for that one pixel size.\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp class=\"p1\"\u003e\u003cstrong\u003eFile -\u0026gt; Generate Fonts….\u003c/strong\u003e Pick location to save then click Generate. Accept default of Other = 96.\u003c/p\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eTo create other sizes go to \u003cstrong\u003estep 7\u003c/strong\u003e and change the pixel size to the next pixel size file you want to create from the same font and characters already selected earlier. For example if you had just created a 36 pixel font, now change it to 24 in \u003cstrong\u003estep 8\u003c/strong\u003e\u0026nbsp;and generate the new file (\u003cstrong\u003estep 9\u003c/strong\u003e). Repeat for as many sizes as you need.\u003c/p\u003e\n\u003cp\u003eFinally if you really want to make the files small, \u003ca href=\"https://learn.adafruit.com/custom-fonts-for-pyportal-circuitpython-display/convert-to-pcf\"\u003efollowing the online instructions\u003c/a\u003e using the \u003ca href=\"https://adafruit.github.io/web-bdftopcf/\"\u003eweb based Adafruit tool\u003c/a\u003e you can convert the .bdf files you just created to even smaller .pcf files. As an example, a (downloaded from Adafruit but further reduced by me) \u003cstrong\u003eArial-Bold-36.bdf\u003c/strong\u003e font which was already a very compact 25kB on my disk got reduced further to a Arial-Bold-36.pcf file of only 16kB.\u003c/p\u003e\n      ","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/203/original/Ascii_32_-_Space.jpg?1727827216","metadata":{"caption":"Step 2: Above is the SPACE box you want to be sure you include when selecting your font character set."}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/204/original/Screenshot_2024-10-01_at_7.25.43%E2%80%AFPM.png?1727827330","metadata":{"caption":"Steps 2 and 3: Above my selection of the characters I want in my reduced final font file."}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/205/original/Screenshot_2024-10-01_at_7.26.12%E2%80%AFPM.png?1727827420","metadata":{"caption":"Step 4: Invert selection to select everything you want to get rid of."}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/206/original/Screenshot_2024-10-01_at_7.26.34%E2%80%AFPM.png?1727827459","metadata":{"caption":"Step 5: remove all the characters you do not want."}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/207/original/Screenshot_2024-10-01_at_7.28.33%E2%80%AFPM.png?1727827505","metadata":{"caption":"Steps 8 and 9: In this example I am making a 36-pixel font file."}}]