diff options
author | Matthias Clasen <mclasen@redhat.com> | 2022-02-12 10:17:51 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-02-17 14:01:45 -0600 |
commit | 6ffbb0cf44768caead49cb75b39163975d1ad28c (patch) | |
tree | 3e7de713f87d8acc4d13007933a75c047499d443 | |
parent | a28bd02bfb80d2e0f4fff29fc7945f8195263cb4 (diff) | |
download | pango-6ffbb0cf44768caead49cb75b39163975d1ad28c.tar.gz |
Move PangoFontMetrics to its own files
-rw-r--r-- | pango/fonts.c | 249 | ||||
-rw-r--r-- | pango/meson.build | 2 | ||||
-rw-r--r-- | pango/pango-font-metrics-private.h | 29 | ||||
-rw-r--r-- | pango/pango-font-metrics.c | 274 | ||||
-rw-r--r-- | pango/pango-font-metrics.h | 98 | ||||
-rw-r--r-- | pango/pango-font-private.h | 3 | ||||
-rw-r--r-- | pango/pango-font.h | 70 | ||||
-rw-r--r-- | pango/pango-fontset.c | 2 | ||||
-rw-r--r-- | pango/pango.h | 1 |
9 files changed, 406 insertions, 322 deletions
diff --git a/pango/fonts.c b/pango/fonts.c index 2a226d89..f2029ed2 100644 --- a/pango/fonts.c +++ b/pango/fonts.c @@ -379,255 +379,6 @@ pango_font_get_hb_font (PangoFont *font) return priv->hb_font; } -G_DEFINE_BOXED_TYPE (PangoFontMetrics, pango_font_metrics, - pango_font_metrics_ref, - pango_font_metrics_unref); - -/** - * pango_font_metrics_new: - * - * Creates a new `PangoFontMetrics` structure. - * - * This is only for internal use by Pango backends and there is - * no public way to set the fields of the structure. - * - * Return value: a newly-created `PangoFontMetrics` structure - * with a reference count of 1. - */ -PangoFontMetrics * -pango_font_metrics_new (void) -{ - PangoFontMetrics *metrics = g_slice_new0 (PangoFontMetrics); - metrics->ref_count = 1; - - return metrics; -} - -/** - * pango_font_metrics_ref: - * @metrics: (nullable): a `PangoFontMetrics` structure, may be %NULL - * - * Increase the reference count of a font metrics structure by one. - * - * Return value: (nullable): @metrics - */ -PangoFontMetrics * -pango_font_metrics_ref (PangoFontMetrics *metrics) -{ - if (metrics == NULL) - return NULL; - - g_atomic_int_inc ((int *) &metrics->ref_count); - - return metrics; -} - -/** - * pango_font_metrics_unref: - * @metrics: (nullable): a `PangoFontMetrics` structure, may be %NULL - * - * Decrease the reference count of a font metrics structure by one. - * - * If the result is zero, frees the structure and any associated memory. - */ -void -pango_font_metrics_unref (PangoFontMetrics *metrics) -{ - if (metrics == NULL) - return; - - g_return_if_fail (metrics->ref_count > 0 ); - - if (g_atomic_int_dec_and_test ((int *) &metrics->ref_count)) - g_slice_free (PangoFontMetrics, metrics); -} - -/** - * pango_font_metrics_get_ascent: - * @metrics: a `PangoFontMetrics` structure - * - * Gets the ascent from a font metrics structure. - * - * The ascent is the distance from the baseline to the logical top - * of a line of text. (The logical top may be above or below the top - * of the actual drawn ink. It is necessary to lay out the text to - * figure where the ink will be.) - * - * Return value: the ascent, in Pango units. - */ -int -pango_font_metrics_get_ascent (PangoFontMetrics *metrics) -{ - g_return_val_if_fail (metrics != NULL, 0); - - return metrics->ascent; -} - -/** - * pango_font_metrics_get_descent: - * @metrics: a `PangoFontMetrics` structure - * - * Gets the descent from a font metrics structure. - * - * The descent is the distance from the baseline to the logical bottom - * of a line of text. (The logical bottom may be above or below the - * bottom of the actual drawn ink. It is necessary to lay out the text - * to figure where the ink will be.) - * - * Return value: the descent, in Pango units. - */ -int -pango_font_metrics_get_descent (PangoFontMetrics *metrics) -{ - g_return_val_if_fail (metrics != NULL, 0); - - return metrics->descent; -} - -/** - * pango_font_metrics_get_height: - * @metrics: a `PangoFontMetrics` structure - * - * Gets the line height from a font metrics structure. - * - * The line height is the recommended distance between successive - * baselines in wrapped text using this font. - * - * If the line height is not available, 0 is returned. - * - * Return value: the height, in Pango units - * - * Since: 1.44 - */ -int -pango_font_metrics_get_height (PangoFontMetrics *metrics) -{ - g_return_val_if_fail (metrics != NULL, 0); - - return metrics->height; -} - -/** - * pango_font_metrics_get_approximate_char_width: - * @metrics: a `PangoFontMetrics` structure - * - * Gets the approximate character width for a font metrics structure. - * - * This is merely a representative value useful, for example, for - * determining the initial size for a window. Actual characters in - * text will be wider and narrower than this. - * - * Return value: the character width, in Pango units. - */ -int -pango_font_metrics_get_approximate_char_width (PangoFontMetrics *metrics) -{ - g_return_val_if_fail (metrics != NULL, 0); - - return metrics->approximate_char_width; -} - -/** - * pango_font_metrics_get_approximate_digit_width: - * @metrics: a `PangoFontMetrics` structure - * - * Gets the approximate digit width for a font metrics structure. - * - * This is merely a representative value useful, for example, for - * determining the initial size for a window. Actual digits in - * text can be wider or narrower than this, though this value - * is generally somewhat more accurate than the result of - * pango_font_metrics_get_approximate_char_width() for digits. - * - * Return value: the digit width, in Pango units. - */ -int -pango_font_metrics_get_approximate_digit_width (PangoFontMetrics *metrics) -{ - g_return_val_if_fail (metrics != NULL, 0); - - return metrics->approximate_digit_width; -} - -/** - * pango_font_metrics_get_underline_position: - * @metrics: a `PangoFontMetrics` structure - * - * Gets the suggested position to draw the underline. - * - * The value returned is the distance *above* the baseline of the top - * of the underline. Since most fonts have underline positions beneath - * the baseline, this value is typically negative. - * - * Return value: the suggested underline position, in Pango units. - * - * Since: 1.6 - */ -int -pango_font_metrics_get_underline_position (PangoFontMetrics *metrics) -{ - g_return_val_if_fail (metrics != NULL, 0); - - return metrics->underline_position; -} - -/** - * pango_font_metrics_get_underline_thickness: - * @metrics: a `PangoFontMetrics` structure - * - * Gets the suggested thickness to draw for the underline. - * - * Return value: the suggested underline thickness, in Pango units. - * - * Since: 1.6 - */ -int -pango_font_metrics_get_underline_thickness (PangoFontMetrics *metrics) -{ - g_return_val_if_fail (metrics != NULL, 0); - - return metrics->underline_thickness; -} - -/** - * pango_font_metrics_get_strikethrough_position: - * @metrics: a `PangoFontMetrics` structure - * - * Gets the suggested position to draw the strikethrough. - * - * The value returned is the distance *above* the - * baseline of the top of the strikethrough. - * - * Return value: the suggested strikethrough position, in Pango units. - * - * Since: 1.6 - */ -int -pango_font_metrics_get_strikethrough_position (PangoFontMetrics *metrics) -{ - g_return_val_if_fail (metrics != NULL, 0); - - return metrics->strikethrough_position; -} - -/** - * pango_font_metrics_get_strikethrough_thickness: - * @metrics: a `PangoFontMetrics` structure - * - * Gets the suggested thickness to draw for the strikethrough. - * - * Return value: the suggested strikethrough thickness, in Pango units. - * - * Since: 1.6 - */ -int -pango_font_metrics_get_strikethrough_thickness (PangoFontMetrics *metrics) -{ - g_return_val_if_fail (metrics != NULL, 0); - - return metrics->strikethrough_thickness; -} - /* * PangoFontFamily */ diff --git a/pango/meson.build b/pango/meson.build index d2d628cc..a6ba61ee 100644 --- a/pango/meson.build +++ b/pango/meson.build @@ -11,6 +11,7 @@ pango_sources = [ 'pango-coverage.c', 'pango-emoji.c', 'pango-font-description.c', + 'pango-font-metrics.c', 'pango-fontmap.c', 'pango-fontset.c', 'pango-fontset-simple.c', @@ -42,6 +43,7 @@ pango_headers = [ 'pango-direction.h', 'pango-font.h', 'pango-font-description.h', + 'pango-font-metrics.h', 'pango-fontmap.h', 'pango-fontset.h', 'pango-fontset-simple.h', diff --git a/pango/pango-font-metrics-private.h b/pango/pango-font-metrics-private.h new file mode 100644 index 00000000..2095af01 --- /dev/null +++ b/pango/pango-font-metrics-private.h @@ -0,0 +1,29 @@ +/* Pango + * + * Copyright (C) 2000 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#pragma once + +#include <pango/pango-font-metrics.h> + +G_BEGIN_DECLS + +PangoFontMetrics *pango_font_metrics_new (void); + +G_END_DECLS diff --git a/pango/pango-font-metrics.c b/pango/pango-font-metrics.c new file mode 100644 index 00000000..bf8e28b3 --- /dev/null +++ b/pango/pango-font-metrics.c @@ -0,0 +1,274 @@ +/* Pango + * pango-font-metrics.c: + * + * Copyright (C) 1999 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include "config.h" + +#include "pango-font-metrics-private.h" + + +G_DEFINE_BOXED_TYPE (PangoFontMetrics, pango_font_metrics, + pango_font_metrics_ref, + pango_font_metrics_unref); + +/** + * pango_font_metrics_new: + * + * Creates a new `PangoFontMetrics` structure. + * + * This is only for internal use by Pango backends and there is + * no public way to set the fields of the structure. + * + * Return value: a newly-created `PangoFontMetrics` structure + * with a reference count of 1. + */ +PangoFontMetrics * +pango_font_metrics_new (void) +{ + PangoFontMetrics *metrics = g_slice_new0 (PangoFontMetrics); + metrics->ref_count = 1; + + return metrics; +} + +/** + * pango_font_metrics_ref: + * @metrics: (nullable): a `PangoFontMetrics` structure, may be %NULL + * + * Increase the reference count of a font metrics structure by one. + * + * Return value: (nullable): @metrics + */ +PangoFontMetrics * +pango_font_metrics_ref (PangoFontMetrics *metrics) +{ + if (metrics == NULL) + return NULL; + + g_atomic_int_inc ((int *) &metrics->ref_count); + + return metrics; +} + +/** + * pango_font_metrics_unref: + * @metrics: (nullable): a `PangoFontMetrics` structure, may be %NULL + * + * Decrease the reference count of a font metrics structure by one. + * + * If the result is zero, frees the structure and any associated memory. + */ +void +pango_font_metrics_unref (PangoFontMetrics *metrics) +{ + if (metrics == NULL) + return; + + g_return_if_fail (metrics->ref_count > 0 ); + + if (g_atomic_int_dec_and_test ((int *) &metrics->ref_count)) + g_slice_free (PangoFontMetrics, metrics); +} + +/** + * pango_font_metrics_get_ascent: + * @metrics: a `PangoFontMetrics` structure + * + * Gets the ascent from a font metrics structure. + * + * The ascent is the distance from the baseline to the logical top + * of a line of text. (The logical top may be above or below the top + * of the actual drawn ink. It is necessary to lay out the text to + * figure where the ink will be.) + * + * Return value: the ascent, in Pango units. + */ +int +pango_font_metrics_get_ascent (PangoFontMetrics *metrics) +{ + g_return_val_if_fail (metrics != NULL, 0); + + return metrics->ascent; +} + +/** + * pango_font_metrics_get_descent: + * @metrics: a `PangoFontMetrics` structure + * + * Gets the descent from a font metrics structure. + * + * The descent is the distance from the baseline to the logical bottom + * of a line of text. (The logical bottom may be above or below the + * bottom of the actual drawn ink. It is necessary to lay out the text + * to figure where the ink will be.) + * + * Return value: the descent, in Pango units. + */ +int +pango_font_metrics_get_descent (PangoFontMetrics *metrics) +{ + g_return_val_if_fail (metrics != NULL, 0); + + return metrics->descent; +} + +/** + * pango_font_metrics_get_height: + * @metrics: a `PangoFontMetrics` structure + * + * Gets the line height from a font metrics structure. + * + * The line height is the recommended distance between successive + * baselines in wrapped text using this font. + * + * If the line height is not available, 0 is returned. + * + * Return value: the height, in Pango units + * + * Since: 1.44 + */ +int +pango_font_metrics_get_height (PangoFontMetrics *metrics) +{ + g_return_val_if_fail (metrics != NULL, 0); + + return metrics->height; +} + +/** + * pango_font_metrics_get_approximate_char_width: + * @metrics: a `PangoFontMetrics` structure + * + * Gets the approximate character width for a font metrics structure. + * + * This is merely a representative value useful, for example, for + * determining the initial size for a window. Actual characters in + * text will be wider and narrower than this. + * + * Return value: the character width, in Pango units. + */ +int +pango_font_metrics_get_approximate_char_width (PangoFontMetrics *metrics) +{ + g_return_val_if_fail (metrics != NULL, 0); + + return metrics->approximate_char_width; +} + +/** + * pango_font_metrics_get_approximate_digit_width: + * @metrics: a `PangoFontMetrics` structure + * + * Gets the approximate digit width for a font metrics structure. + * + * This is merely a representative value useful, for example, for + * determining the initial size for a window. Actual digits in + * text can be wider or narrower than this, though this value + * is generally somewhat more accurate than the result of + * pango_font_metrics_get_approximate_char_width() for digits. + * + * Return value: the digit width, in Pango units. + */ +int +pango_font_metrics_get_approximate_digit_width (PangoFontMetrics *metrics) +{ + g_return_val_if_fail (metrics != NULL, 0); + + return metrics->approximate_digit_width; +} + +/** + * pango_font_metrics_get_underline_position: + * @metrics: a `PangoFontMetrics` structure + * + * Gets the suggested position to draw the underline. + * + * The value returned is the distance *above* the baseline of the top + * of the underline. Since most fonts have underline positions beneath + * the baseline, this value is typically negative. + * + * Return value: the suggested underline position, in Pango units. + * + * Since: 1.6 + */ +int +pango_font_metrics_get_underline_position (PangoFontMetrics *metrics) +{ + g_return_val_if_fail (metrics != NULL, 0); + + return metrics->underline_position; +} + +/** + * pango_font_metrics_get_underline_thickness: + * @metrics: a `PangoFontMetrics` structure + * + * Gets the suggested thickness to draw for the underline. + * + * Return value: the suggested underline thickness, in Pango units. + * + * Since: 1.6 + */ +int +pango_font_metrics_get_underline_thickness (PangoFontMetrics *metrics) +{ + g_return_val_if_fail (metrics != NULL, 0); + + return metrics->underline_thickness; +} + +/** + * pango_font_metrics_get_strikethrough_position: + * @metrics: a `PangoFontMetrics` structure + * + * Gets the suggested position to draw the strikethrough. + * + * The value returned is the distance *above* the + * baseline of the top of the strikethrough. + * + * Return value: the suggested strikethrough position, in Pango units. + * + * Since: 1.6 + */ +int +pango_font_metrics_get_strikethrough_position (PangoFontMetrics *metrics) +{ + g_return_val_if_fail (metrics != NULL, 0); + + return metrics->strikethrough_position; +} + +/** + * pango_font_metrics_get_strikethrough_thickness: + * @metrics: a `PangoFontMetrics` structure + * + * Gets the suggested thickness to draw for the strikethrough. + * + * Return value: the suggested strikethrough thickness, in Pango units. + * + * Since: 1.6 + */ +int +pango_font_metrics_get_strikethrough_thickness (PangoFontMetrics *metrics) +{ + g_return_val_if_fail (metrics != NULL, 0); + + return metrics->strikethrough_thickness; +} diff --git a/pango/pango-font-metrics.h b/pango/pango-font-metrics.h new file mode 100644 index 00000000..73cb9e81 --- /dev/null +++ b/pango/pango-font-metrics.h @@ -0,0 +1,98 @@ +/* Pango + * pango-font-metrics.h: Font handling + * + * Copyright (C) 2000 Red Hat Software + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#pragma once + +#include <pango/pango-coverage.h> +#include <pango/pango-types.h> +#include <pango/pango-font-description.h> + +#include <glib-object.h> +#include <hb.h> + +G_BEGIN_DECLS + +/** + * PangoFontMetrics: + * + * A `PangoFontMetrics` structure holds the overall metric information + * for a font. + * + * The information in a `PangoFontMetrics` structure may be restricted + * to a script. The fields of this structure are private to implementations + * of a font backend. See the documentation of the corresponding getters + * for documentation of their meaning. + * + * For an overview of the most important metrics, see: + * + * <picture> + * <source srcset="fontmetrics-dark.png" media="(prefers-color-scheme: dark)"> + * <img alt="Font metrics" src="fontmetrics-light.png"> + * </picture> + + */ +typedef struct _PangoFontMetrics PangoFontMetrics; + +#define PANGO_TYPE_FONT_METRICS (pango_font_metrics_get_type ()) + +struct _PangoFontMetrics +{ + /* <private> */ + guint ref_count; + + int ascent; + int descent; + int height; + int approximate_char_width; + int approximate_digit_width; + int underline_position; + int underline_thickness; + int strikethrough_position; + int strikethrough_thickness; +}; + +PANGO_AVAILABLE_IN_ALL +GType pango_font_metrics_get_type (void) G_GNUC_CONST; +PANGO_AVAILABLE_IN_ALL +PangoFontMetrics *pango_font_metrics_ref (PangoFontMetrics *metrics); +PANGO_AVAILABLE_IN_ALL +void pango_font_metrics_unref (PangoFontMetrics *metrics); +PANGO_AVAILABLE_IN_ALL +int pango_font_metrics_get_ascent (PangoFontMetrics *metrics) G_GNUC_PURE; +PANGO_AVAILABLE_IN_ALL +int pango_font_metrics_get_descent (PangoFontMetrics *metrics) G_GNUC_PURE; +PANGO_AVAILABLE_IN_1_44 +int pango_font_metrics_get_height (PangoFontMetrics *metrics) G_GNUC_PURE; +PANGO_AVAILABLE_IN_ALL +int pango_font_metrics_get_approximate_char_width (PangoFontMetrics *metrics) G_GNUC_PURE; +PANGO_AVAILABLE_IN_ALL +int pango_font_metrics_get_approximate_digit_width (PangoFontMetrics *metrics) G_GNUC_PURE; +PANGO_AVAILABLE_IN_1_6 +int pango_font_metrics_get_underline_position (PangoFontMetrics *metrics) G_GNUC_PURE; +PANGO_AVAILABLE_IN_1_6 +int pango_font_metrics_get_underline_thickness (PangoFontMetrics *metrics) G_GNUC_PURE; +PANGO_AVAILABLE_IN_1_6 +int pango_font_metrics_get_strikethrough_position (PangoFontMetrics *metrics) G_GNUC_PURE; +PANGO_AVAILABLE_IN_1_6 +int pango_font_metrics_get_strikethrough_thickness (PangoFontMetrics *metrics) G_GNUC_PURE; + + +G_END_DECLS diff --git a/pango/pango-font-private.h b/pango/pango-font-private.h index ce056be5..7f4f74b6 100644 --- a/pango/pango-font-private.h +++ b/pango/pango-font-private.h @@ -131,9 +131,6 @@ struct _PangoFontClass #define PANGO_FONT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FONT, PangoFontClass)) -PANGO_AVAILABLE_IN_ALL -PangoFontMetrics *pango_font_metrics_new (void); - typedef struct { PangoLanguage ** (* get_languages) (PangoFont *font); diff --git a/pango/pango-font.h b/pango/pango-font.h index 3776b2d0..859005a1 100644 --- a/pango/pango-font.h +++ b/pango/pango-font.h @@ -25,81 +25,13 @@ #include <pango/pango-coverage.h> #include <pango/pango-types.h> #include <pango/pango-font-description.h> +#include <pango/pango-font-metrics.h> #include <glib-object.h> #include <hb.h> G_BEGIN_DECLS -/** - * PangoFontMetrics: - * - * A `PangoFontMetrics` structure holds the overall metric information - * for a font. - * - * The information in a `PangoFontMetrics` structure may be restricted - * to a script. The fields of this structure are private to implementations - * of a font backend. See the documentation of the corresponding getters - * for documentation of their meaning. - * - * For an overview of the most important metrics, see: - * - * <picture> - * <source srcset="fontmetrics-dark.png" media="(prefers-color-scheme: dark)"> - * <img alt="Font metrics" src="fontmetrics-light.png"> - * </picture> - - */ -typedef struct _PangoFontMetrics PangoFontMetrics; - -/* - * PangoFontMetrics - */ - -#define PANGO_TYPE_FONT_METRICS (pango_font_metrics_get_type ()) - -struct _PangoFontMetrics -{ - /* <private> */ - guint ref_count; - - int ascent; - int descent; - int height; - int approximate_char_width; - int approximate_digit_width; - int underline_position; - int underline_thickness; - int strikethrough_position; - int strikethrough_thickness; -}; - -PANGO_AVAILABLE_IN_ALL -GType pango_font_metrics_get_type (void) G_GNUC_CONST; -PANGO_AVAILABLE_IN_ALL -PangoFontMetrics *pango_font_metrics_ref (PangoFontMetrics *metrics); -PANGO_AVAILABLE_IN_ALL -void pango_font_metrics_unref (PangoFontMetrics *metrics); -PANGO_AVAILABLE_IN_ALL -int pango_font_metrics_get_ascent (PangoFontMetrics *metrics) G_GNUC_PURE; -PANGO_AVAILABLE_IN_ALL -int pango_font_metrics_get_descent (PangoFontMetrics *metrics) G_GNUC_PURE; -PANGO_AVAILABLE_IN_1_44 -int pango_font_metrics_get_height (PangoFontMetrics *metrics) G_GNUC_PURE; -PANGO_AVAILABLE_IN_ALL -int pango_font_metrics_get_approximate_char_width (PangoFontMetrics *metrics) G_GNUC_PURE; -PANGO_AVAILABLE_IN_ALL -int pango_font_metrics_get_approximate_digit_width (PangoFontMetrics *metrics) G_GNUC_PURE; -PANGO_AVAILABLE_IN_1_6 -int pango_font_metrics_get_underline_position (PangoFontMetrics *metrics) G_GNUC_PURE; -PANGO_AVAILABLE_IN_1_6 -int pango_font_metrics_get_underline_thickness (PangoFontMetrics *metrics) G_GNUC_PURE; -PANGO_AVAILABLE_IN_1_6 -int pango_font_metrics_get_strikethrough_position (PangoFontMetrics *metrics) G_GNUC_PURE; -PANGO_AVAILABLE_IN_1_6 -int pango_font_metrics_get_strikethrough_thickness (PangoFontMetrics *metrics) G_GNUC_PURE; - - /* * PangoFontFamily */ diff --git a/pango/pango-fontset.c b/pango/pango-fontset.c index fc9e05b8..7281d149 100644 --- a/pango/pango-fontset.c +++ b/pango/pango-fontset.c @@ -26,7 +26,7 @@ */ #include "pango-types.h" -#include "pango-font-private.h" +#include "pango-font-metrics-private.h" #include "pango-fontset.h" #include "pango-impl-utils.h" diff --git a/pango/pango.h b/pango/pango.h index 8f16bbc1..3bb3ebff 100644 --- a/pango/pango.h +++ b/pango/pango.h @@ -32,6 +32,7 @@ #include <pango/pango-features.h> #include <pango/pango-font.h> #include <pango/pango-font-description.h> +#include <pango/pango-font-metrics.h> #include <pango/pango-fontmap.h> #include <pango/pango-fontset.h> #include <pango/pango-fontset-simple.h> |