From 2c969d984d1186d8762edb7b7ade16c8742c0d73 Mon Sep 17 00:00:00 2001 From: Alex Larsson Date: Fri, 4 May 2001 21:30:53 +0000 Subject: Set approximate_digit_width and approximate_char_width. The digit one 2001-05-04 Alex Larsson * pango/pangoft2.c (get_font_metrics_from_subfonts): Set approximate_digit_width and approximate_char_width. The digit one could be done better (see bug 53425). --- ChangeLog | 6 ++++++ ChangeLog.pre-1-0 | 6 ++++++ ChangeLog.pre-1-10 | 6 ++++++ ChangeLog.pre-1-2 | 6 ++++++ ChangeLog.pre-1-4 | 6 ++++++ ChangeLog.pre-1-6 | 6 ++++++ ChangeLog.pre-1-8 | 6 ++++++ pango/pangoft2.c | 6 ++++++ 8 files changed, 48 insertions(+) diff --git a/ChangeLog b/ChangeLog index 95557af9..b32d2abb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-05-04 Alex Larsson + + * pango/pangoft2.c (get_font_metrics_from_subfonts): + Set approximate_digit_width and approximate_char_width. The + digit one could be done better (see bug 53425). + 2001-05-03 Michael Natterer * configure.in: also check for the the Xft header. diff --git a/ChangeLog.pre-1-0 b/ChangeLog.pre-1-0 index 95557af9..b32d2abb 100644 --- a/ChangeLog.pre-1-0 +++ b/ChangeLog.pre-1-0 @@ -1,3 +1,9 @@ +2001-05-04 Alex Larsson + + * pango/pangoft2.c (get_font_metrics_from_subfonts): + Set approximate_digit_width and approximate_char_width. The + digit one could be done better (see bug 53425). + 2001-05-03 Michael Natterer * configure.in: also check for the the Xft header. diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10 index 95557af9..b32d2abb 100644 --- a/ChangeLog.pre-1-10 +++ b/ChangeLog.pre-1-10 @@ -1,3 +1,9 @@ +2001-05-04 Alex Larsson + + * pango/pangoft2.c (get_font_metrics_from_subfonts): + Set approximate_digit_width and approximate_char_width. The + digit one could be done better (see bug 53425). + 2001-05-03 Michael Natterer * configure.in: also check for the the Xft header. diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2 index 95557af9..b32d2abb 100644 --- a/ChangeLog.pre-1-2 +++ b/ChangeLog.pre-1-2 @@ -1,3 +1,9 @@ +2001-05-04 Alex Larsson + + * pango/pangoft2.c (get_font_metrics_from_subfonts): + Set approximate_digit_width and approximate_char_width. The + digit one could be done better (see bug 53425). + 2001-05-03 Michael Natterer * configure.in: also check for the the Xft header. diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4 index 95557af9..b32d2abb 100644 --- a/ChangeLog.pre-1-4 +++ b/ChangeLog.pre-1-4 @@ -1,3 +1,9 @@ +2001-05-04 Alex Larsson + + * pango/pangoft2.c (get_font_metrics_from_subfonts): + Set approximate_digit_width and approximate_char_width. The + digit one could be done better (see bug 53425). + 2001-05-03 Michael Natterer * configure.in: also check for the the Xft header. diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6 index 95557af9..b32d2abb 100644 --- a/ChangeLog.pre-1-6 +++ b/ChangeLog.pre-1-6 @@ -1,3 +1,9 @@ +2001-05-04 Alex Larsson + + * pango/pangoft2.c (get_font_metrics_from_subfonts): + Set approximate_digit_width and approximate_char_width. The + digit one could be done better (see bug 53425). + 2001-05-03 Michael Natterer * configure.in: also check for the the Xft header. diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8 index 95557af9..b32d2abb 100644 --- a/ChangeLog.pre-1-8 +++ b/ChangeLog.pre-1-8 @@ -1,3 +1,9 @@ +2001-05-04 Alex Larsson + + * pango/pangoft2.c (get_font_metrics_from_subfonts): + Set approximate_digit_width and approximate_char_width. The + digit one could be done better (see bug 53425). + 2001-05-03 Michael Natterer * configure.in: also check for the the Xft header. diff --git a/pango/pangoft2.c b/pango/pangoft2.c index dbe66c0c..6c59ce79 100644 --- a/pango/pangoft2.c +++ b/pango/pangoft2.c @@ -526,12 +526,18 @@ get_font_metrics_from_subfonts (PangoFont *font, { metrics->ascent = PANGO_UNITS_26_6 (face->size->metrics.ascender); metrics->descent = PANGO_UNITS_26_6 (-face->size->metrics.descender); + metrics->approximate_digit_width = PANGO_UNITS_26_6 (face->size->metrics.max_advance); + metrics->approximate_char_width = PANGO_UNITS_26_6 (face->size->metrics.max_advance); first = FALSE; } else { metrics->ascent = MAX (PANGO_UNITS_26_6 (face->size->metrics.ascender), metrics->ascent); metrics->descent = MAX (PANGO_UNITS_26_6 (-face->size->metrics.descender), metrics->descent); + metrics->approximate_digit_width = + MAX (PANGO_UNITS_26_6 (face->size->metrics.max_advance), metrics->approximate_digit_width); + metrics->approximate_char_width = + MAX (PANGO_UNITS_26_6 (face->size->metrics.max_advance), metrics->approximate_char_width); } tmp_list = tmp_list->next; -- cgit v1.2.1