Skip to main content

Loads bitmap fonts into CircuitPython displayio.

Project description

Introduction

Documentation Status Discord Build Status Code Style: Black

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

Built Distribution

File details

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

File metadata

File hashes

Hashes for adafruit_circuitpython_bitmap_font-2.1.3.tar.gz
Algorithm Hash digest
SHA256 fce77b5c37550a3e608a920a5323d793162ff2e98b7b269d2d0158f16c8cf723
MD5 26dfa5b74e2bfb429233bad373b1a8d5
BLAKE2b-256 ca050af65a76425aaef0c5f9d431e4e55cba41a6237446bd90ae2880324f92fb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adafruit_circuitpython_bitmap_font-2.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d9e96c2f04412e31becaaafb7d876b70b8ede0d094fd531ccc0e68b8a271291c
MD5 3fb4707768c9d46e540909a51ea935ec
BLAKE2b-256 0b238f9faa00c70672978a5c44f707755b35c790c9e6c00001dbaf0b6d9d2c41

See more details on using hashes here.

Supported by

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