diff --git a/radio/src/fonts/extra_16px.png b/radio/src/fonts/extra_16px.png index aa140bdb4..a687b11f0 100644 Binary files a/radio/src/fonts/extra_16px.png and b/radio/src/fonts/extra_16px.png differ diff --git a/tools/build-font-bitmap.py b/tools/build-font-bitmap.py index 8c4235cd7..804028129 100755 --- a/tools/build-font-bitmap.py +++ b/tools/build-font-bitmap.py @@ -92,21 +92,26 @@ class FontBitmap: width = 0 for c in self.chars: - coords.append(width) - if c == " ": - width += 4 + w = 4 elif c in special_chars["cn"]: - width += self.draw_char(image, width, c, self.cjk_font) + w = self.draw_char(image, width, c, self.cjk_font) elif c not in extra_chars: - width += self.draw_char(image, width, c, self.font) + w = self.draw_char(image, width, c, self.font) + else: + continue + coords.append(width) + width += w + coords.append(width) _, top, _, bottom = self.get_real_size(image) if self.extra_bitmap: image.paste(self.extra_bitmap.copy(), (width, top)) - width += self.extra_bitmap.width + for coord in [14, 14, 12, 12, 13, 13, 13, 13, 13] + [15] * 12: + width += coord + coords.append(width) image = image.crop((0, top, width, bottom)) coords.insert(0, bottom - top)