diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-07-18 08:40:29 -0700 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-07-18 08:42:26 -0700 |
commit | 4b391df696fe4887ebf3390a77a23293bf8b495c (patch) | |
tree | 2b12690362cacd84062f2645bd7daf3412106832 /pango/pangocairo-coretextfont.c | |
parent | 9f127f497082be67080933b7dc717831520a9dc3 (diff) | |
download | pango-4b391df696fe4887ebf3390a77a23293bf8b495c.tar.gz |
OS X: Prevent recursion in get_metrics
create_base_metrics is not meant to fill in widths.
That is done in _pango_cairo_font_get_metrics.
Diffstat (limited to 'pango/pangocairo-coretextfont.c')
-rw-r--r-- | pango/pangocairo-coretextfont.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/pango/pangocairo-coretextfont.c b/pango/pangocairo-coretextfont.c index aadb8a3f..aea2d207 100644 --- a/pango/pangocairo-coretextfont.c +++ b/pango/pangocairo-coretextfont.c @@ -147,20 +147,6 @@ pango_cairo_core_text_font_create_base_metrics_for_context (PangoCairoFont *font metrics->strikethrough_position = metrics->ascent / 3; metrics->strikethrough_thickness = CTFontGetUnderlineThickness (ctfont) * PANGO_SCALE; - layout = pango_layout_new (context); - font_desc = pango_font_describe_with_absolute_size ((PangoFont *) font); - pango_layout_set_font_description (layout, font_desc); - pango_layout_set_text (layout, sample_str, -1); - pango_layout_get_extents (layout, NULL, &extents); - - metrics->approximate_char_width = extents.width / pango_utf8_strwidth (sample_str); - - pango_layout_set_text (layout, "0123456789", -1); - metrics->approximate_digit_width = max_glyph_width (layout); - - pango_font_description_free (font_desc); - g_object_unref (layout); - return metrics; } |