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.3.tar.gz (843.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

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

File metadata

File hashes

Hashes for adafruit_circuitpython_bitmap_font-2.3.3.tar.gz
Algorithm Hash digest
SHA256 3d36bc1fe83497a92c6d2a3cd9756f34e57a687cd057a73c6db2cb2dca4bc951
MD5 7b2a94ccdd7f5596a4cc15c677a887d7
BLAKE2b-256 b5903a7babc2ff6ff955a6c7ba99acf770b193a40e3ee10c5eda0d7134e1203d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adafruit_circuitpython_bitmap_font-2.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b305ce28a557e2057d5f7d023414d8b03f98700b2c75fc51365829ab02a62de0
MD5 0bfe0a40491acf4013322d2d8f050b00
BLAKE2b-256 179e5261e15d4e03e072f4fafa22e7623f5e37e36ddaf30a4059f691e1f47c7f

See more details on using hashes here.

Supported by

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