[pango/pango-1-44: 17/31] Speed up font format filtering
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango-1-44: 17/31] Speed up font format filtering
- Date: Sun, 9 May 2021 01:32:01 +0000 (UTC)
commit c1821251e368025c5a7dea751e6be7d4cd8c1d4e
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Aug 15 15:28:40 2020 -0400
Speed up font format filtering
We were needlessly duplicating patters when we
could have just referenced them.
(cherry-picked from commit e9703ea3)
pango/pangofc-fontmap.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index ade3cffc..a3440673 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -839,7 +839,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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]