diff options
author | Quentin Glidic <sardemff7+git@sardemff7.net> | 2019-11-22 22:33:52 +0100 |
---|---|---|
committer | Quentin Glidic <sardemff7+git@sardemff7.net> | 2019-11-22 22:33:52 +0100 |
commit | 1bd73c1f6802e9eaef464b395cbba1349c8ae4a4 (patch) | |
tree | f3498e6cb7697430ed6b74d2bacb1e75431eda66 | |
parent | c4a4243616464fb442c5bde4becc11bee7b4e506 (diff) |
textbox: Get font metrics for default language only
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
-rw-r--r-- | source/widgets/textbox.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/widgets/textbox.c b/source/widgets/textbox.c index 69506558..225d5e2a 100644 --- a/source/widgets/textbox.c +++ b/source/widgets/textbox.c @@ -804,7 +804,7 @@ void textbox_set_pango_context ( const char *font, PangoContext *p ) { g_assert ( p_metrics == NULL ); p_context = g_object_ref ( p ); - p_metrics = pango_context_get_metrics ( p_context, NULL, NULL ); + p_metrics = pango_context_get_metrics ( p_context, NULL, pango_language_get_default () ); TBFontConfig *tbfc = g_malloc0 ( sizeof ( TBFontConfig ) ); tbfc->metrics = p_metrics; tbfc->height = pango_font_metrics_get_ascent ( tbfc->metrics ) + pango_font_metrics_get_descent ( tbfc->metrics ); |