#!/usr/bin/env python # # This file provides a small 4x5 (width and height) font primarily designed to # present the current date and time. # # The .data property provides the bits for each character available in .alphabet. # For each character, the consumer must extract the bits (4x5 == 20 bits) from # the offset given by the the character's position in .alphabet * 20. # # Example: # # font = PixelFont() # digit = '2' # Extract and plot the digit '2' # # start_bit = font.alphabet.find(digit) * font.width * font.height # font_byte = start_bit // 8 # font_bit = start_bit % 8 # for y in range(font.height): # for x in range(font.width): # is_lit = font.data[font_byte] & (1<