[pango/explicit-fontconfig-init] fontconfig: Explicitly init fontconfig
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/explicit-fontconfig-init] fontconfig: Explicitly init fontconfig
- Date: Tue, 18 Aug 2020 20:58:55 +0000 (UTC)
commit 5f889a07c1e7191adac7b45a450bb007a59d309c
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Aug 18 16:44:18 2020 -0400
fontconfig: Explicitly init fontconfig
Otherwise, fontconfig ends up parsing it enormous
configuration the first time we call FcConfigSubstitute,
which takes ~60ms here. We don't want that to hit us
unexpectedly, so get it out of the way early.
pango/pangofc-fontmap.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index 4c2aa094c..4e2a2c7b9 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -1206,6 +1206,8 @@ pango_fc_font_map_init (PangoFcFontMap *fcfontmap)
(GDestroyNotify)pango_fc_font_face_data_free,
NULL);
priv->dpi = -1;
+
+ FcInit ();
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]