[pango/misc-cleanups: 2/3] fc: Cleanup
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/misc-cleanups: 2/3] fc: Cleanup
- Date: Sat, 18 Dec 2021 23:53:06 +0000 (UTC)
commit 9783d3623fc55e23a2141cd31faeffcf4307537d
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Dec 18 11:18:44 2021 -0500
fc: Cleanup
Stop using fcfont->matrix. This is just a redundant
copy of the matrix that is already available in
the font key. Just use that.
pango/pangofc-font.c | 3 ++-
pango/pangofc-font.h | 2 +-
pango/pangofc-fontmap.c | 1 -
3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/pango/pangofc-font.c b/pango/pangofc-font.c
index f29580c3..37400664 100644
--- a/pango/pangofc-font.c
+++ b/pango/pangofc-font.c
@@ -1117,8 +1117,9 @@ _pango_fc_font_get_scale_factors (PangoFont *font,
double *y_scale)
{
PangoFcFont *fcfont = PANGO_FC_FONT (font);
+ PangoFcFontPrivate *priv = fcfont->priv;
- pango_matrix_get_font_scale_factors (&fcfont->matrix, x_scale, y_scale);
+ pango_matrix_get_font_scale_factors (pango_fc_font_key_get_matrix (priv->key), x_scale, y_scale);
}
static void
diff --git a/pango/pangofc-font.h b/pango/pangofc-font.h
index 89b0cc79..25361fa0 100644
--- a/pango/pangofc-font.h
+++ b/pango/pangofc-font.h
@@ -75,7 +75,7 @@ struct _PangoFcFont
FcPattern *font_pattern; /* fully resolved pattern */
PangoFontMap *fontmap; /* associated map */
gpointer priv; /* used internally */
- PangoMatrix matrix; /* used internally */
+ PangoMatrix matrix; /* unused */
PangoFontDescription *description;
GSList *metrics_by_lang;
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index 0cfe5de8..d198df45 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -2013,7 +2013,6 @@ pango_fc_font_map_new_font (PangoFcFontMap *fcfontmap,
if (!fcfont)
return NULL;
- fcfont->matrix = key.matrix;
/* In case the backend didn't set the fontmap */
if (!fcfont->fontmap)
g_object_set (fcfont,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]