Project

General

Profile

Feature #985 ยป 0048-sdl3-Replace-TTF_FontHeight-with-TTF_GetFontHeight.patch

Marko Lindqvist, 10/19/2024 07:32 AM

View differences:

client/gui-sdl3/gui_string.c
fill->h = h;
} else {
fill->w = 0;
fill->h = (pstr ? TTF_FontHeight(pstr->font) : 0);
fill->h = (pstr ? TTF_GetFontHeight(pstr->font) : 0);
}
}
......
if (text != NULL) {
log_debug("create_utf8_surf: Font is generally %d big, and "
"string is %d big", TTF_FontHeight(pstr->font), text->h);
"string is %d big",
TTF_GetFontHeight(pstr->font), text->h);
log_debug("create_utf8_surf: String is %d length", text->w);
} else {
log_debug("create_utf8_surf: text NULL");
client/gui-sdl3/mapview.c
info = create_text_surf_from_utf8(pstr);
if (info_window->size.h >
(DEFAULT_UNITS_H + (info_window->size.h - info_window->area.h)) || right) {
int h = TTF_FontHeight(info_window->string_utf8->font);
(DEFAULT_UNITS_H + (info_window->size.h - info_window->area.h))
|| right) {
int h = TTF_GetFontHeight(info_window->string_utf8->font);
fc_snprintf(buffer, sizeof(buffer), "%s",
sdl_get_tile_defense_info_text(ptile));
    (1-1/1)