default font

This commit is contained in:
Bartosz Kościów 2017-06-10 21:08:32 +02:00
parent fe507357f6
commit a1b498591f
3 changed files with 3 additions and 5 deletions

View File

@ -1,5 +1,6 @@
"""Chip interface""" """Chip interface"""
import abc import abc
from gfxlcd.font.font8x8 import Font8x8
class Chip(metaclass=abc.ABCMeta): class Chip(metaclass=abc.ABCMeta):
@ -11,7 +12,7 @@ class Chip(metaclass=abc.ABCMeta):
self._height = height self._height = height
self.driver = driver self.driver = driver
self.options['auto_flush'] = auto_flush self.options['auto_flush'] = auto_flush
self.options['font'] = None self.options['font'] = Font8x8()
@property @property
def width(self): def width(self):

View File

@ -1,7 +1,7 @@
"""NJU6450 chip""" """NJU6450 chip"""
from gfxlcd.drawing.page import Page from gfxlcd.drawing.page import Page
from gfxlcd.abstract.chip import Chip from gfxlcd.abstract.chip import Chip
from gfxlcd.font.font8x8 import Font8x8
class NJU6450(Page, Chip): class NJU6450(Page, Chip):
@ -10,7 +10,6 @@ class NJU6450(Page, Chip):
Chip.__init__(self, width, height, driver, auto_flush) Chip.__init__(self, width, height, driver, auto_flush)
Page.__init__(self, driver) Page.__init__(self, driver)
self.rotation = 0 self.rotation = 0
self.options['font'] = Font8x8()
def init(self): def init(self):
"""initialize display""" """initialize display"""

View File

@ -1,7 +1,6 @@
"""SSD1306 chip driver""" """SSD1306 chip driver"""
from gfxlcd.drawing.page import Page from gfxlcd.drawing.page import Page
from gfxlcd.abstract.chip import Chip from gfxlcd.abstract.chip import Chip
from gfxlcd.font.font8x8 import Font8x8
class SSD1306(Page, Chip): class SSD1306(Page, Chip):
@ -29,7 +28,6 @@ class SSD1306(Page, Chip):
Chip.__init__(self, width, height, driver, auto_flush) Chip.__init__(self, width, height, driver, auto_flush)
Page.__init__(self, driver) Page.__init__(self, driver)
self.rotation = 0 self.rotation = 0
self.options['font'] = Font8x8()
def init(self): def init(self):
"""inits a device""" """inits a device"""