Add support for fontio
This commit is contained in:
parent
c0f8e55764
commit
e26a474223
3 changed files with 7 additions and 4 deletions
|
|
@ -40,7 +40,10 @@ Implementation Notes
|
|||
"""
|
||||
|
||||
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"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import collections
|
||||
|
||||
class Bitmap:
|
||||
def __init__(self, width, height, color_count):
|
||||
|
|
@ -20,5 +19,3 @@ class Bitmap:
|
|||
|
||||
def __len__(self):
|
||||
return self.width * self.height
|
||||
|
||||
Glyph = collections.namedtuple("Glyph", ["bitmap", "tile_index", "width", "height", "dx", "dy", "shift_x", "shift_y"])
|
||||
|
|
|
|||
3
test/fontio.py
Normal file
3
test/fontio.py
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import collections
|
||||
|
||||
Glyph = collections.namedtuple("Glyph", ["bitmap", "tile_index", "width", "height", "dx", "dy", "shift_x", "shift_y"])
|
||||
Loading…
Reference in a new issue