mirror of
https://github.com/esphome/esphome.git
synced 2025-01-07 05:11:43 +01:00
[font] Fix failure with bitmap fonts (#7691)
This commit is contained in:
parent
88627095fb
commit
63e4d4b493
1 changed files with 2 additions and 2 deletions
|
@ -344,7 +344,7 @@ class TrueTypeFontWrapper:
|
||||||
return offset_x, offset_y
|
return offset_x, offset_y
|
||||||
|
|
||||||
def getmask(self, glyph, **kwargs):
|
def getmask(self, glyph, **kwargs):
|
||||||
return self.font.getmask(glyph, **kwargs)
|
return self.font.getmask(str(glyph), **kwargs)
|
||||||
|
|
||||||
def getmetrics(self, glyphs):
|
def getmetrics(self, glyphs):
|
||||||
return self.font.getmetrics()
|
return self.font.getmetrics()
|
||||||
|
@ -359,7 +359,7 @@ class BitmapFontWrapper:
|
||||||
return 0, 0
|
return 0, 0
|
||||||
|
|
||||||
def getmask(self, glyph, **kwargs):
|
def getmask(self, glyph, **kwargs):
|
||||||
return self.font.getmask(glyph, **kwargs)
|
return self.font.getmask(str(glyph), **kwargs)
|
||||||
|
|
||||||
def getmetrics(self, glyphs):
|
def getmetrics(self, glyphs):
|
||||||
max_height = 0
|
max_height = 0
|
||||||
|
|
Loading…
Reference in a new issue