Engine/lib/sdl/src/video/x11/SDL_x11messagebox.c
/* Return width and height for a string. */
Return width and height for a string.
Return width and height for a string .
static void
GetTextWidthHeight( SDL_MessageBoxDataX11 *data, const char *str, int nbytes, int *pwidth, int *pheight )
{
    if (SDL_X11_HAVE_UTF8) {
        XRectangle overall_ink, overall_logical;
        X11_Xutf8TextExtents(data->font_set, str, nbytes, &overall_ink, &overall_logical);
        *pwidth = overall_logical.width;
        *pheight = overall_logical.height;
    } else {
        XCharStruct text_structure;
        int font_direction, font_ascent, font_descent;
        X11_XTextExtents( data->font_struct, str, nbytes,
                      &font_direction, &font_ascent, &font_descent,
                      &text_structure );
        *pwidth = text_structure.width;
        *pheight = text_structure.ascent + text_structure.descent;
    }
}
static void GetTextWidthHeight ( SDL_MessageBoxDataX11 * data , const char * str , int nbytes , int * pwidth , int * pheight ) { if ( SDL_X11_HAVE_UTF8 ) { XRectangle overall_ink , overall_logical ; X11_Xutf8TextExtents ( data -> font_set , str , nbytes , & overall_ink , & overall_logical ) ; * pwidth = overall_logical . width ; * pheight = overall_logical . height ; } else { XCharStruct text_structure ; int font_direction , font_ascent , font_descent ; X11_XTextExtents ( data -> font_struct , str , nbytes , & font_direction , & font_ascent , & font_descent , & text_structure ) ; * pwidth = text_structure . width ; * pheight = text_structure . ascent + text_structure . descent ; } }
Return width and height for a string.
Return width and height for a string .