1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-21 12:42:21 +01:00
This commit is contained in:
Otto Winter
2018-08-25 22:27:30 +02:00
parent 9ea9b4b102
commit 1576e1847e
5 changed files with 12 additions and 20 deletions

View File

@@ -46,7 +46,7 @@ def validate_pillow_installed(value):
try:
import PIL
except ImportError:
raise vol.Invalid("Please install the pillow python package to use fonts. "
raise vol.Invalid("Please install the pillow python package to use this feature. "
"(pip2 install pillow)")
if PIL.__version__[0] < '4':
@@ -103,7 +103,7 @@ def to_code(config):
_, (offset_x, offset_y) = font.font.getsize(glyph)
width, height = mask.size
width8 = ((width + 7) // 8) * 8
glyph_data = [0 for _ in range(height * width8 // 8)]
glyph_data = [0 for _ in range(height * width8 // 8)] # noqa: F812
for y in range(height):
for x in range(width):
if not mask.getpixel((x, y)):