Skip to main content

Loads bitmap fonts into CircuitPython displayio.

Project description

Introduction

Documentation Status Discord Build Status Code Style: Ruff

Loads bitmap fonts into CircuitPython’s displayio. BDF and PCF files are well supported. TTF support is not yet complete.

Dependencies

This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.

Installing from PyPI

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:

pip3 install adafruit-circuitpython-bitmap_font

To install system-wide (this may be required in some cases):

sudo pip3 install adafruit-circuitpython-bitmap_font

To install in a virtual environment in your current project:

mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-bitmap_font

Usage Example

from adafruit_bitmap_font import bitmap_font
from displayio import Bitmap
font = bitmap_font.load_font("fonts/LeagueSpartan-Bold-16.bdf", Bitmap)
print(font.get_glyph(ord("A")))

Creating Fonts

See this learn guide for more information about building custom font files.

The command line tool otf2bdf can be used make bdf files for use with this library.

The command line tool bdftopcf can be used make pcf files for use with this library.

Documentation

API documentation for this library can be found on Read the Docs.

For information on building library documentation, please check out this guide.

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adafruit_circuitpython_bitmap_font-2.3.1.tar.gz (843.2 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file adafruit_circuitpython_bitmap_font-2.3.1.tar.gz.

File metadata

File hashes

Hashes for adafruit_circuitpython_bitmap_font-2.3.1.tar.gz
Algorithm Hash digest
SHA256 bb93a693d45693159b180cee1516e2be98c6ce0dbb133b8a812c4da97f50b25f
MD5 f2fd7c4a1d2c32aa5698e7e034546978
BLAKE2b-256 4352e9aa0b3acaba3411647c38056800013bd04bd14afc66005fceace2102d82

See more details on using hashes here.

File details

Details for the file adafruit_circuitpython_bitmap_font-2.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for adafruit_circuitpython_bitmap_font-2.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 673acd98ab8e4238e2518bf1473c05547f9579f84a31cc2d5021003bacbce00d
MD5 e72aec487f7e71e843865f7f469ddad9
BLAKE2b-256 0409738754dc409b1353dc13e25071bc2a7b10c7216b2292300fa996ef4f2b08

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page