Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 843 Bytes

File metadata and controls

30 lines (20 loc) · 843 Bytes

Display

.. autoclass:: ev3dev2.display.Display
    :members:
    :show-inheritance:


Bitmap fonts

The :py:class:`ev3dev2.display.Display` class allows to write text on the LCD using python imaging library (PIL) interface (see description of the text() method here). The ev3dev2.fonts module contains bitmap fonts in PIL format that should look good on a tiny EV3 screen:

import ev3dev2.fonts as fonts
display.draw.text((10,10), 'Hello World!', font=fonts.load('luBS14'))
.. autofunction:: ev3dev2.fonts.available

.. autofunction:: ev3dev2.fonts.load

The following image lists all available fonts. The grid lines correspond to EV3 screen size:

_static/fonts.png