font_bitmap_info[font_bitmap_id].width = graphic_info[graphic].width;
font_bitmap_info[font_bitmap_id].height = graphic_info[graphic].height;
+ font_bitmap_info[font_bitmap_id].offset_x =
+ (graphic_info[graphic].offset_x != 0 ?
+ graphic_info[graphic].offset_x :
+ graphic_info[graphic].width);
+ font_bitmap_info[font_bitmap_id].offset_y =
+ (graphic_info[graphic].offset_y != 0 ?
+ graphic_info[graphic].offset_y :
+ graphic_info[graphic].height);
+
font_bitmap_info[font_bitmap_id].draw_xoffset =
graphic_info[graphic].draw_xoffset;
font_bitmap_info[font_bitmap_id].draw_yoffset =
int src_x, src_y; /* start position of font characters */
int width, height; /* width / height of font characters */
+ int offset_x; /* offset to next font character */
+ int offset_y; /* offset to next font character */
+
int draw_xoffset; /* offset for drawing font characters */
int draw_yoffset; /* offset for drawing font characters */
int font_pos = getFontCharPosition(font_nr, c);
*bitmap = font->bitmap;
- *x = font->src_x + (font_pos % font->num_chars_per_line) * font->width;
- *y = font->src_y + (font_pos / font->num_chars_per_line) * font->height;
+ *x = font->src_x + (font_pos % font->num_chars_per_line) * font->offset_x;
+ *y = font->src_y + (font_pos / font->num_chars_per_line) * font->offset_y;
}