• Skip to main content
  • Shop
  • Learn
  • Blog
  • Forums
  • IO
  • LIVE!
  • AdaBox
Adafruit Logo
0
  • Sign In | Create Account
  • Playground
  • Shop
  • Learn
  • Blog
  • Forums
  • IO
  • LIVE!
  • AdaBox
Sign In
0
Adafruit Logo
  • Learn Categories
    • 3D Printing
    • AdaBox
    • Adafruit Products
    • Arduino Compatibles
    • Breakout Boards
    • Circuit Playground
    • CircuitPython
    • CLUE
    • Community Support
    • Components
    • Crickit
    • Customer & Partner Projects
    • Development Boards
    • Educators
    • EL Wire/Tape/Panel
    • Feather
    • Gaming
    • Hacks
    • Internet of Things - IOT
    • LCDs & Displays
    • LEDs
    • Machine Learning
    • MakeCode
    • Maker Business
    • micro:bit
    • Microcontrollers
    • Programming
    • Raspberry Pi
    • Robotics & CNC
    • Sensors
    • STEMMA
    • Tools
    • Trellis
    • Wearables
    Explore, Groups to get your gears turning
    Explore
    Groups to get your gears turning
    Explore Groups
  • New Guides
  • Playground
Timeline Notes
Image for user Timeline

Timeline

u/Timeline

Getting Started

Adafruit Playground is a wonderful and safe place to share your interests with Adafruit's vibrant community of makers and doers. Have a cool project you are working on? Have a bit of code that you think others will find useful? Want to show off your electronics workbench? You have come to the right place.

The goal of Adafruit Playground is to make it as simple as possible to share your work. On the Adafruit Playground users can create Notes. A note is a single-page space where you can document your topic using Adafruit's easy-to-use editor. Notes are like Guides on the Adafruit Learning System but guides are high-fidelity content curated and maintained by Adafuit. Notes are whatever you want them to be. Have fun and be kind.

Click here to learn more about Adafruit Playground and how to get started.

  • Image for user Timeline
    By Timeline

    Creating Reduced Sized Bitmap Fonts From .ttf File

    ... using FontForge

    Because CircuitPython uses bitmapped fonts (.bdf) as well as the binary .pcf format but many free fonts online are in .ttf format, following the Custom Fonts for CircuitPython Displays 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.

    1. Open .ttf font file in FontForge

    2. Select characters wanted including space before the “!” (you may need to scroll up). 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.

    3. Besides the basics of numbers, letters, and punctuation, be sure to select any others you want. I have noticed many .bdf fonts, including CircuitPython's built in terminalio.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.

    4. Edit -> Select -> invert selection (selects everything you don’t want).

    5. Encoding -> Detach & remove glyphs… (everything you don't want is removed)

    6. Element -> Simplify -> Simplify and click OK on the warning box.

    7. Element -> Bitmap Strikes Available…

    8. In 3rd field, Pixel Sizes, enter size you want to create. 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.

    9. File -> Generate Fonts…. Pick location to save then click Generate. Accept default of Other = 96.

    To create other sizes go to step 7 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 step 8 and generate the new file (step 9). Repeat for as many sizes as you need.

    Finally if you really want to make the files small, following the online instructions using the web based Adafruit tool 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) Arial-Bold-36.bdf font which was already a very compact 25kB on my disk got reduced further to a Arial-Bold-36.pcf file of only 16kB.

    Ascii_32_-_Space.jpg
    Save
Search

Getting Started

Adafruit Playground is a wonderful and safe place to share your interests with Adafruit's vibrant community of makers and doers. Have a cool project you are working on? Have a bit of code that you think others will find useful? Want to show off your electronics workbench? You have come to the right place.

The goal of Adafruit Playground is to make it as simple as possible to share your work. On the Adafruit Playground users can create Notes. A note is a single-page space where you can document your topic using Adafruit's easy-to-use editor. Notes are like Guides on the Adafruit Learning System but guides are high-fidelity content curated and maintained by Adafuit. Notes are whatever you want them to be. Have fun and be kind.

Click here to learn more about Adafruit Playground and how to get started.

    • Contact Us
    • Tech Support Forums
    • FAQs
    • Shipping & Returns
    • Freebies
    • Terms of Service
    • Privacy & Legal
    • Website Accessibility
    • LLMs.txt
    • About Us
    • Press
    • Educators
    • Distributors
    • Jobs
    • Gift Cards
    "As we enjoy great advantages from the inventions of others, we should be glad of an opportunity to serve others by any invention of ours; and this we should do freely and generously."
    Benjamin Franklin
    Adafruit Logo
    A Minority and Woman-owned Business Enterprise (M/WBE)