Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for fontio #8

Merged
merged 1 commit into from
Mar 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"])