diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-05-05 12:20:24 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-05-05 12:20:24 +0200 |
| commit | 170a9d8e1fc00e55a2a9a13abc16107cbcecded0 (patch) | |
| tree | a7ff31193d97ef942f2ac906d4f6cab3ec4f0411 | |
| parent | af91083a7fd15100ef04b66b521c321249143580 (diff) | |
Approximate result of pango_font_metrics_get_height() for Pango < 1.44
| -rw-r--r-- | src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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); |
