font: font_texture_create() support font size argument

This commit is contained in:
Johan Malm 2021-08-20 20:20:49 +01:00
parent 16620698fb
commit a668f6f73d
6 changed files with 58 additions and 35 deletions

View file

@ -374,10 +374,11 @@ create_corners(struct theme *theme, struct wlr_renderer *renderer)
static void
post_processing(struct theme *theme)
{
char buf[256];
snprintf(buf, sizeof(buf), "%s %d", rc.font_name_activewindow,
rc.font_size_activewindow);
theme->title_height = font_height(buf) + 2 * theme->padding_height;
struct font font = {
.name = rc.font_name_activewindow,
.size = rc.font_size_activewindow,
};
theme->title_height = font_height(&font) + 2 * theme->padding_height;
if (rc.corner_radius >= theme->title_height) {
theme->title_height = rc.corner_radius + 1;