diff options
author | Matthias Clasen <mclasen@redhat.com> | 2022-02-15 17:49:58 -0600 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-02-15 17:49:58 -0600 |
commit | 5d4ccae966eef90a48d6e838a475bcf0c9c6122f (patch) | |
tree | 72e6947bbe5678b877284a4a1191db9c94b0462c /pango/pangofc-font.c | |
parent | 8c48207a1fc645acb38ef3a69fc8a9fb1bf048d3 (diff) | |
download | pango-5d4ccae966eef90a48d6e838a475bcf0c9c6122f.tar.gz |
Use newer harfbuzz apihb-metrics-fallback
Use pango_ot_metrics_get_position_with_fallback,
where appropriate.
Diffstat (limited to 'pango/pangofc-font.c')
-rw-r--r-- | pango/pangofc-font.c | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/pango/pangofc-font.c b/pango/pangofc-font.c index 9d555a37..6a26691a 100644 --- a/pango/pangofc-font.c +++ b/pango/pangofc-font.c @@ -379,29 +379,17 @@ get_face_metrics (PangoFcFont *fcfont, metrics->height = extents.ascender - extents.descender + extents.line_gap; } - if (hb_ot_metrics_get_position (hb_font, HB_OT_METRICS_TAG_UNDERLINE_SIZE, &position) && - position != 0) - metrics->underline_thickness = position; - else - metrics->underline_thickness = PANGO_SCALE; + hb_ot_metrics_get_position_with_fallback (hb_font, HB_OT_METRICS_TAG_UNDERLINE_SIZE, &position); + metrics->underline_thickness = position; - if (hb_ot_metrics_get_position (hb_font, HB_OT_METRICS_TAG_UNDERLINE_OFFSET, &position) && - position != 0) - metrics->underline_position = position; - else - metrics->underline_position = - PANGO_SCALE; + hb_ot_metrics_get_position_with_fallback (hb_font, HB_OT_METRICS_TAG_UNDERLINE_OFFSET, &position); + metrics->underline_position = position; - if (hb_ot_metrics_get_position (hb_font, HB_OT_METRICS_TAG_STRIKEOUT_SIZE, &position) && - position != 0) - metrics->strikethrough_thickness = position; - else - metrics->strikethrough_thickness = PANGO_SCALE; + hb_ot_metrics_get_position_with_fallback (hb_font, HB_OT_METRICS_TAG_STRIKEOUT_SIZE, &position); + metrics->strikethrough_thickness = position; - if (hb_ot_metrics_get_position (hb_font, HB_OT_METRICS_TAG_STRIKEOUT_OFFSET, &position) && - position != 0) - metrics->strikethrough_position = position; - else - metrics->strikethrough_position = metrics->ascent / 2; + hb_ot_metrics_get_position_with_fallback (hb_font, HB_OT_METRICS_TAG_STRIKEOUT_OFFSET, &position); + metrics->strikethrough_position = position; } PangoFontMetrics * |