Index: SDL_ttf.c =================================================================== --- SDL_ttf.c (revision 2747) +++ SDL_ttf.c (working copy) @@ -717,42 +717,42 @@ return unicode; } -int TTF_FontHeight(TTF_Font *font) +int TTF_FontHeight(const TTF_Font *font) { return(font->height); } -int TTF_FontAscent(TTF_Font *font) +int TTF_FontAscent(const TTF_Font *font) { return(font->ascent); } -int TTF_FontDescent(TTF_Font *font) +int TTF_FontDescent(const TTF_Font *font) { return(font->descent); } -int TTF_FontLineSkip(TTF_Font *font) +int TTF_FontLineSkip(const TTF_Font *font) { return(font->lineskip); } -long TTF_FontFaces(TTF_Font *font) +long TTF_FontFaces(const TTF_Font *font) { return(font->face->num_faces); } -int TTF_FontFaceIsFixedWidth(TTF_Font *font) +int TTF_FontFaceIsFixedWidth(const TTF_Font *font) { return(FT_IS_FIXED_WIDTH(font->face)); } -char *TTF_FontFaceFamilyName(TTF_Font *font) +char *TTF_FontFaceFamilyName(const TTF_Font *font) { return(font->face->family_name); } -char *TTF_FontFaceStyleName(TTF_Font *font) +char *TTF_FontFaceStyleName(const TTF_Font *font) { return(font->face->style_name); } @@ -1736,7 +1736,7 @@ Flush_Cache( font ); } -int TTF_GetFontStyle( TTF_Font* font ) +int TTF_GetFontStyle( const TTF_Font* font ) { return font->style; } Index: SDL_ttf.h =================================================================== --- SDL_ttf.h (revision 2747) +++ SDL_ttf.h (working copy) @@ -99,32 +99,32 @@ #define TTF_STYLE_BOLD 0x01 #define TTF_STYLE_ITALIC 0x02 #define TTF_STYLE_UNDERLINE 0x04 -extern DECLSPEC int SDLCALL TTF_GetFontStyle(TTF_Font *font); +extern DECLSPEC int SDLCALL TTF_GetFontStyle(const TTF_Font *font); extern DECLSPEC void SDLCALL TTF_SetFontStyle(TTF_Font *font, int style); /* Get the total height of the font - usually equal to point size */ -extern DECLSPEC int SDLCALL TTF_FontHeight(TTF_Font *font); +extern DECLSPEC int SDLCALL TTF_FontHeight(const TTF_Font *font); /* Get the offset from the baseline to the top of the font This is a positive value, relative to the baseline. */ -extern DECLSPEC int SDLCALL TTF_FontAscent(TTF_Font *font); +extern DECLSPEC int SDLCALL TTF_FontAscent(const TTF_Font *font); /* Get the offset from the baseline to the bottom of the font This is a negative value, relative to the baseline. */ -extern DECLSPEC int SDLCALL TTF_FontDescent(TTF_Font *font); +extern DECLSPEC int SDLCALL TTF_FontDescent(const TTF_Font *font); /* Get the recommended spacing between lines of text for this font */ -extern DECLSPEC int SDLCALL TTF_FontLineSkip(TTF_Font *font); +extern DECLSPEC int SDLCALL TTF_FontLineSkip(const TTF_Font *font); /* Get the number of faces of the font */ -extern DECLSPEC long SDLCALL TTF_FontFaces(TTF_Font *font); +extern DECLSPEC long SDLCALL TTF_FontFaces(const TTF_Font *font); /* Get the font face attributes, if any */ -extern DECLSPEC int SDLCALL TTF_FontFaceIsFixedWidth(TTF_Font *font); -extern DECLSPEC char * SDLCALL TTF_FontFaceFamilyName(TTF_Font *font); -extern DECLSPEC char * SDLCALL TTF_FontFaceStyleName(TTF_Font *font); +extern DECLSPEC int SDLCALL TTF_FontFaceIsFixedWidth(const TTF_Font *font); +extern DECLSPEC char * SDLCALL TTF_FontFaceFamilyName(const TTF_Font *font); +extern DECLSPEC char * SDLCALL TTF_FontFaceStyleName(const TTF_Font *font); /* Get the metrics (dimensions) of a glyph To understand what these metrics mean, here is a useful link: