diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-08-15 15:28:40 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-08-15 15:28:40 -0400 |
commit | e9703ea37a471fb1f61f57e644c78a6a411ad5d6 (patch) | |
tree | 3792a1e5631c2559de596923ddbf5bc8ba2bffa6 /pango/pangofc-fontmap.c | |
parent | 3eaff0ed87763e3a7d1e36541cbc0fdd7df58269 (diff) | |
download | pango-e9703ea37a471fb1f61f57e644c78a6a411ad5d6.tar.gz |
Speed up font format filtering
We were needlessly duplicating patters when we
could have just referenced them.
Diffstat (limited to 'pango/pangofc-fontmap.c')
-rw-r--r-- | pango/pangofc-fontmap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c index ec504094..6d7ae3aa 100644 --- a/pango/pangofc-fontmap.c +++ b/pango/pangofc-fontmap.c @@ -848,7 +848,10 @@ filter_fontset_by_format (FcFontSet *fontset) for (i = 0; i < fontset->nfont; i++) { if (pango_fc_is_supported_font_format (fontset->fonts[i])) - FcFontSetAdd (result, FcPatternDuplicate (fontset->fonts[i])); + { + FcPatternReference (fontset->fonts[i]); + FcFontSetAdd (result, fontset->fonts[i]); + } } return result; |