[pango/wip-bitmatrix: 4/5] Get the coverage order early on
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/wip-bitmatrix: 4/5] Get the coverage order early on
- Date: Sun, 23 Aug 2020 23:12:01 +0000 (UTC)
commit 09160cdb0e17f9073da387af51008fb1f5b5e791
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Aug 22 19:01:58 2020 -0400
Get the coverage order early on
Trigger the generation of the coverage order
as soon as fontconfig is initialized.
pango/pangofc-fontmap.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
---
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index ba89c6f1..349cd5a0 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -1437,6 +1437,20 @@ wait_for_fc_init (void)
pango_trace_mark (before, "wait for FcInit", NULL);
}
+static void
+fc_init_done (GObject *source_object,
+ GAsyncResult *result,
+ gpointer data)
+{
+ PangoFcFontMap *fcfontmap = PANGO_FC_FONT_MAP (source_object);
+
+ if (fcfontmap->priv->closed)
+ return;
+
+ /* prepare fonts, and trigger coverage calculation */
+ pango_fc_font_map_get_config_fonts (fcfontmap);
+}
+
static void
pango_fc_font_map_init (PangoFcFontMap *fcfontmap)
{
@@ -1472,7 +1486,7 @@ pango_fc_font_map_init (PangoFcFontMap *fcfontmap)
{
GTask *task;
- task = g_task_new (fcfontmap, NULL, NULL, NULL);
+ task = g_task_new (fcfontmap, NULL, fc_init_done, NULL);
g_task_set_name (task, "[pango] FcInit");
g_task_run_in_thread (task, init_in_thread);
g_object_unref (task);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]