- Полный RE стока V3.25 (Cortex-M4F) + FM100B: карта памяти, протокол, codeplug, UI-архитектура - Русификация: свой CP1251-шрифт + патч рендера, перевод меню и надписей, ребренд Ru-4D V3.25 - Блюпринт переделки UI + C-тулчейн (clang thumbv7em), доказан инъекцией - Готовые флешеры: WebSerial .html и Windows .exe со вшитой прошивкой - Дамп SPI рации, стоковая прошивка, инструменты сборки Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
44 строки
2.8 KiB
Python
44 строки
2.8 KiB
Python
#!/usr/bin/env python3
|
|
"""Bold (2px) uppercase Russian font, 6px wide (cols 1..6, col0 = 1px left
|
|
bearing), body rows 3..11 (all glyphs 9 rows tall to match the stock ASCII caps).
|
|
12 letters reuse the stock ASCII/digit glyph bytes; the rest are hand-drawn.
|
|
"""
|
|
|
|
# Cyrillic upper -> stock ASCII char whose glyph bitmap is identical
|
|
REUSE = {"А":"A","В":"B","Е":"E","З":"3","К":"K","М":"M","Н":"H",
|
|
"О":"O","Р":"P","С":"C","Т":"T","Х":"X"}
|
|
|
|
# hand-drawn, exactly 9 rows -> placed at rows 3..11 (top-of-cap = 3, baseline = 11)
|
|
_U = {
|
|
"Б":[".######",".##....",".##....",".#####.",".##..##",".##..##",".##..##",".##..##",".#####."],
|
|
"Г":[".######",".##....",".##....",".##....",".##....",".##....",".##....",".##....",".##...."],
|
|
"Д":["..#####","..##..#","..##..#","..##..#","..##..#","..##..#","..##..#",".######",".##..##"],
|
|
"Ж":[".#.#.#.",".#.#.#.","..###..","...#...","...#...","..###..",".#.#.#.",".#.#.#.",".#.#.#."],
|
|
"И":[".##..##",".##..##",".##.###",".#####.",".#####.",".###.##",".##..##",".##..##",".##..##"],
|
|
"Й":["..####.","...##..",".##..##",".##.###",".#####.",".###.##",".##..##",".##..##",".##..##"],
|
|
"Л":["..#####","..##..#","..##..#","..##..#","..##..#","..##..#",".##...#",".##...#",".##...#"],
|
|
"П":[".######",".##..##",".##..##",".##..##",".##..##",".##..##",".##..##",".##..##",".##..##"],
|
|
"У":[".##.##.",".##.##.","..###..","...##..","...##..","...##..","..##...",".##....",".#....."],
|
|
"Ф":["...##..",".######",".#.##.#",".#.##.#",".#.##.#",".######","...##..","...##..","...##.."],
|
|
"Ц":[".##.##.",".##.##.",".##.##.",".##.##.",".##.##.",".##.##.",".##.##.",".#####.","....##."],
|
|
"Ч":[".##..##",".##..##",".##..##",".######",".....##",".....##",".....##",".....##",".....##"],
|
|
"Ш":[".#.##.#",".#.##.#",".#.##.#",".#.##.#",".#.##.#",".#.##.#",".#.##.#",".#.##.#",".######"],
|
|
"Щ":[".#.##.#",".#.##.#",".#.##.#",".#.##.#",".#.##.#",".#.##.#",".#.##.#",".######","......#"],
|
|
"Ъ":[".###...","..##...","..##...","..##...","..####.","..##.##","..##.##","..##.##","..####."],
|
|
"Ы":[".##...#",".##...#",".##...#",".##...#",".####.#",".##.#.#",".##.#.#",".##.#.#",".####.#"],
|
|
"Ь":[".##....",".##....",".##....",".##....",".#####.",".##..##",".##..##",".##..##",".#####."],
|
|
"Э":[".#####.",".##..##",".....##","...####",".....##",".....##",".....##",".##..##",".#####."],
|
|
"Ю":[".#..##.",".#.#..#",".#.#..#",".####.#",".#.#..#",".#.#..#",".#.#..#",".#.#..#",".#..##."],
|
|
"Я":[".######",".##..##",".##..##",".######",".....##","....#.#","...#..#","..#...#",".#....#"],
|
|
"Ё":[".#.#...",".......",".######",".##....",".#####.",".##....",".##....",".##....",".######"],
|
|
}
|
|
|
|
def unique_rows(ch):
|
|
body = _U[ch] # exactly 9 rows -> rows 3..11
|
|
grid = ["......."] * 14
|
|
for i, r in enumerate(body):
|
|
grid[3 + i] = r
|
|
return grid
|
|
|
|
LETTERS = list(REUSE.keys()) + list(_U.keys())
|