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

@ -125,7 +125,11 @@ osd_update(struct server *server)
y = OSD_BORDER_WIDTH;
/* vertically center align */
y += (OSD_ITEM_HEIGHT - font_height("sans 10")) / 2;
struct font font = {
.name = "sans",
.size = 10,
};
y += (OSD_ITEM_HEIGHT - font_height(&font)) / 2;
wl_list_for_each(view, &server->views, link) {
if (!isfocusable(view)) {