mirror of
https://github.com/esphome/esphome.git
synced 2025-10-30 14:43:51 +00:00
[font] Fix failure with bitmap fonts (#7691)
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user