render: csd_title(): use a custom font, sized based on the title bar’s height

We still use the primary font, but use a custom size, based on the
title bar’s height.

This fixes an issue where the window title could be way too small, or
way too big. And changed size when the terminal font size was changed.
This commit is contained in:
Daniel Eklöf 2021-07-22 21:23:59 +02:00
parent 4a41575cb5
commit 0cf7a19616
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 43 additions and 3 deletions

View file

@ -20,6 +20,7 @@
#include <xdg-activation-v1.h>
#endif
#include <fcft/fcft.h>
#include <tllist.h>
#include "fdm.h"
@ -402,6 +403,7 @@ struct wl_window {
struct {
struct wl_surf_subsurf surface[CSD_SURF_COUNT];
struct fcft_font *font;
int move_timeout_fd;
uint32_t serial;
} csd;