Skip to content

Commit 62ff15e

Browse files
authored
Merge pull request #52 from steka/improve_font_to_bin
Reformat font data to make it easier to view and change.
2 parents 9d05e34 + 12fed55 commit 62ff15e

File tree

2 files changed

+2585
-264
lines changed

2 files changed

+2585
-264
lines changed

examples/framebuf_simpletest.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
22
# SPDX-License-Identifier: MIT
33

4+
import math
45
import adafruit_framebuf
56

67
print("framebuf test will draw to the REPL")
78

89
WIDTH = 32
910
HEIGHT = 8
1011

11-
buffer = bytearray(round(WIDTH * HEIGHT / 8))
12+
buffer = bytearray(round(WIDTH * math.ceil(HEIGHT / 8)))
1213
fb = adafruit_framebuf.FrameBuffer(
1314
buffer, WIDTH, HEIGHT, buf_format=adafruit_framebuf.MVLSB
1415
)
1516

17+
1618
# Ascii printer for very small framebufs!
1719
def print_buffer(the_fb):
1820
print("." * (the_fb.width + 2))

0 commit comments

Comments
 (0)