--- nono/wx/fontmanager.cpp 2026/04/29 17:05:12 1.1.1.2 +++ nono/wx/fontmanager.cpp 2026/04/29 17:05:16 1.1.1.3 @@ -35,7 +35,7 @@ FontManager::SetFont(FontId fontid_) fontid = fontid_; // フォントデータを更新。 - // 6x12, 8x16 半角は X68030 CGROM にあるのでそれを使う。 + // 6x12, 8x16, 12x24 半角は X68030 CGROM にあるのでそれを使う。 const uint8 *base; switch (fontid) { case FontId::_6x12: @@ -44,6 +44,9 @@ FontManager::SetFont(FontId fontid_) case FontId::_8x16: base = Builtin::CGROM8x16(); break; + case FontId::_12x24: + base = Builtin::CGROM12x24(); + break; default: PANIC("fontid=%d", fontid); } @@ -82,8 +85,11 @@ FontManager::SetFont(FontId fontid_) case FontId::_8x16: ptr = (const char *)pchar.data16; break; + case FontId::_12x24: + ptr = (const char *)pchar.data24; + break; default: - __unreachable(); + PANIC("corrupted fontid=%d", (int)fontid); } int idx = pchar.code * font_bytes; @@ -176,9 +182,13 @@ FontManager::KanjiGlyph(uint16 sjiscode, // 16x16 は X680x0 CGROM のを使う。 base = Builtin::CGROM16x16(); break; + case FontId::_12x24: + // 24x24 は X680x0 CGROM のを使う。 + base = Builtin::CGROM24x24(); + break; default: // ここより先に必ず半角のほうでエラーが出るはず - __unreachable(); + PANIC("corrupted fontid=%d", (int)fontid); } int bytes = (((font_width * 2) + 7) / 8) * font_height; @@ -201,4 +211,5 @@ FontManager::fontinfo = { // 順序はヘッダの FontId_* 識別子の順と揃えること FONT_6x12, FONT_8x16, + FONT_12x24, };