mame/src/emu/rendfont.h
Aaron Giles 4498faacd9 First round of an attempted cleanup of header files in the system.
- Created new central header "emu.h"; this should be included
    by pretty much any driver or device as the first include. This
    file in turn includes pretty much everything a driver or device
    will need, minus any other devices it references. Note that
    emu.h should *never* be included by another header file.
 - Updated all files in the core (src/emu) to use emu.h.
 - Removed a ton of redundant and poorly-tracked header includes
    from within other header files.
 - Temporarily changed driver.h to map to emu.h until we update
    files outside of the core.

Added class wrapper around tagmap so it can be directly included
and accessed within objects that need it. Updated all users to
embed tagmap objects and changed them to call through the class.

Added nicer functions for finding devices, ports, and regions in
a machine:

   machine->device("tag") -- return the named device, or NULL
   machine->port("tag") -- return the named port, or NULL
   machine->region("tag"[, &length[, &flags]]) -- return the
      named region and optionally its length and flags
      
Made the device tag an astring. This required touching a lot of 
code that printed the device to explicitly fetch the C-string
from it. (Thank you gcc for flagging that issue!)
2010-01-10 00:29:26 +00:00

33 lines
1.3 KiB
C

/***************************************************************************
rendfont.h
Rendering system font management.
Copyright Nicola Salmoria and the MAME Team.
Visit http://mamedev.org for licensing and usage restrictions.
***************************************************************************/
#ifndef __RENDFONT_H__
#define __RENDFONT_H__
#include "render.h"
/***************************************************************************
FUNCTION PROTOTYPES
***************************************************************************/
render_font *render_font_alloc(const char *filename);
void render_font_free(render_font *font);
INT32 render_font_get_pixel_height(render_font *font);
render_texture *render_font_get_char_texture_and_bounds(render_font *font, float height, float aspect, unicode_char ch, render_bounds *bounds);
void render_font_get_scaled_bitmap_and_bounds(render_font *font, bitmap_t *dest, float height, float aspect, unicode_char chnum, rectangle *bounds);
float render_font_get_char_width(render_font *font, float height, float aspect, unicode_char ch);
float render_font_get_string_width(render_font *font, float height, float aspect, const char *string);
float render_font_get_utf8string_width(render_font *font, float height, float aspect, const char *utf8string);
#endif /* __RENDFONT_H__ */