[font] Be more explanatory in missing glyph error message

This commit is contained in:
Fabian Wickborn 2024-11-22 12:14:59 +00:00
parent ef7c5c6055
commit a1ec50ed24

View file

@ -108,7 +108,7 @@ def check_missing_glyphs(file, codepoints: Iterable, warning: bool = False):
) )
if count > 10: if count > 10:
missing_str += f"\n and {count - 10} more." missing_str += f"\n and {count - 10} more."
message = f"Font {Path(file).name} is missing {count} glyph{'s' if count != 1 else ''}:\n {missing_str}" message = f"Font {Path(file).name} is missing {count} glyph{'s' if count != 1 else ''}:\n {missing_str}\nESPHome version 2024.11.0 introduced testing for missing glyphs in the compilation phase. Missing glyphs are most likely a problem of the font itself."
if warning: if warning:
_LOGGER.warning(message) _LOGGER.warning(message)
else: else: