From 170a9d8e1fc00e55a2a9a13abc16107cbcecded0 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Thu, 5 May 2022 12:20:24 +0200 Subject: Approximate result of pango_font_metrics_get_height() for Pango < 1.44 --- src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx b/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx index 829290676..9c5d8292c 100644 --- a/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx +++ b/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx @@ -1051,7 +1051,7 @@ Fl_Cairo_Font_Descriptor::Fl_Cairo_Font_Descriptor(const char* name, Fl_Fontsize #if PANGO_VERSION_CHECK(1,44,0) line_height = ceil(pango_font_metrics_get_height(metrics)/double(PANGO_SCALE)); // 1.44 #else - line_height = int(size * 1.3 + 0.5); // TO IMPROVE + line_height = int( (pango_font_metrics_get_ascent(metrics) + pango_font_metrics_get_descent(metrics)) * 1.025 / PANGO_SCALE + 0.5); #endif q_width = pango_font_metrics_get_approximate_char_width(metrics)/PANGO_SCALE; pango_font_metrics_unref(metrics); -- cgit v1.2.3