Add language-specific font configuration

meta.xml can now have a <font> tag, which gives the name of the font
that the language needs. This will directly control the interface font
when the language is active, and will soon also control the font used
for each option on the language screen.
This commit is contained in:
Dav999-v
2023-01-15 01:31:02 +01:00
committed by Misa Elizabeth Kai
parent dadb7f2623
commit 5dad6b38be
12 changed files with 94 additions and 23 deletions

View File

@@ -712,8 +712,11 @@ static void menurender(void)
);
graphics.Print(10, 10, buffer, tr/2, tg/2, tb/2);
uint8_t font_h = 8;
font::glyph_dimensions_main(loc::get_langmeta()->font_idx, NULL, &font_h);
int box_x = SDL_min(10, (320-overflow.max_w_px)/2);
int box_h = overflow.max_h_px - SDL_max(0, 10-loc::get_langmeta()->font_h);
int box_h = overflow.max_h_px - SDL_max(0, 10-font_h);
graphics.fill_rect(box_x-1, 30-1, overflow.max_w_px+2, box_h+2, tr/3, tg/3, tb/3);
int wraplimit;