+ int font_bitmap_id = gfx.select_font_function(font_nr);
+
+ return gfx.font_bitmap_info[font_bitmap_id].height;
+}
+
+boolean getFontChar(int font_nr, char c, int *src_x, int *src_y)
+{
+ int font_bitmap_id = gfx.select_font_function(font_nr);
+ struct FontBitmapInfo *font = &gfx.font_bitmap_info[font_bitmap_id];
+
+ if ((c >= 32 && c <= 95) || c == '°' || c == '´' || c == '|')
+ {
+ *src_x = font->src_x + ((c - 32) % FONT_CHARS_PER_LINE) * font->width;
+ *src_y = font->src_y + ((c - 32) / FONT_CHARS_PER_LINE) * font->height;
+
+ /* map '°' and 'TM' signs and cursor */
+ if (c == '°' || c == '´' || c == '|')
+ {
+ *src_x = font->src_x + FONT_CHARS_PER_LINE * font->width;
+ *src_y = font->src_y + (c == '°' ? 1 : c == '´' ? 2 : 3) * font->height;
+ }
+
+ return TRUE;
+ }
+
+ return FALSE;