From 62d90a8e959c6edcc752e124a9928cfa2399fbd1 Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Wed, 18 Aug 2021 23:27:01 +0200 Subject: Use fixed titlebar heights Use fixed titlebar heights. The default height is calculated based on font metrics for the configured font and current locale. Some testing with titles with emoji and CJK characters (which are substantially higher in my setup) shows that the titlebars retain their initial value, text does shift up or down, and all titlebars always remain aligned. Also drop some also now-unecessary title_height calculations. Makes also needed to be updated, since they should be positioned with the same rules. --- include/pango.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/pango.h') diff --git a/include/pango.h b/include/pango.h index 75dbba27..7f41441b 100644 --- a/include/pango.h +++ b/include/pango.h @@ -17,6 +17,7 @@ PangoLayout *get_pango_layout(cairo_t *cairo, const char *font, const char *text, double scale, bool markup); void get_text_size(cairo_t *cairo, const char *font, int *width, int *height, int *baseline, double scale, bool markup, const char *fmt, ...); +void get_text_metrics(const char *font, int *height, int *baseline); void pango_printf(cairo_t *cairo, const char *font, double scale, bool markup, const char *fmt, ...); -- cgit v1.2.3-54-g00ecf