Skip to content

Commit

Permalink
Add support for fontio
Browse files Browse the repository at this point in the history
  • Loading branch information
tannewt committed Mar 19, 2019
1 parent c0f8e55 commit e26a474
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion adafruit_bitmap_font/bdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@
"""

import gc
from displayio import Glyph
try:
from displayio import Glyph
except ImportError:
from fontio import Glyph
from .glyph_cache import GlyphCache

__version__ = "0.0.0-auto.0"
Expand Down
3 changes: 0 additions & 3 deletions test/displayio.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import collections

class Bitmap:
def __init__(self, width, height, color_count):
Expand All @@ -20,5 +19,3 @@ def __getitem__(self, index):

def __len__(self):
return self.width * self.height

Glyph = collections.namedtuple("Glyph", ["bitmap", "tile_index", "width", "height", "dx", "dy", "shift_x", "shift_y"])
3 changes: 3 additions & 0 deletions test/fontio.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import collections

Glyph = collections.namedtuple("Glyph", ["bitmap", "tile_index", "width", "height", "dx", "dy", "shift_x", "shift_y"])

0 comments on commit e26a474

Please sign in to comment.