<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">Fix find_shaper for module-less pango. This patch is the second hunk of:

https://gitlab.gnome.org/Archive/pangox-compat/-/commit/edb9e0904d04d1da02bba7b78601a2aba05aaa47

The first hunk, which removed pango_x_get_shaper_map, is not included because
that function is still used elsewhere in the code.
--- pangox.c.orig	2012-08-27 18:19:32.000000000 -0500
+++ pangox.c	2023-07-20 22:49:00.000000000 -0500
@@ -1372,12 +1372,11 @@
 			  PangoLanguage *language,
 			  guint32        ch)
 {
-  PangoMap *shape_map = NULL;
-  PangoScript script;
-
-  shape_map = pango_x_get_shaper_map (language);
-  script = pango_script_for_unichar (ch);
-  return (PangoEngineShape *)pango_map_get_engine (shape_map, script);
+  static PangoEngineShape *shaper;
+  if (g_once_init_enter (&amp;shaper))
+    g_once_init_leave (&amp;shaper,
+		       _pango_basic_x_script_engine_create("BasicScriptEngineXCompat"));
+  return shaper;
 }
 
 /* Utility functions */
</pre></body></html>