[pango: 1/2] Remove hb-glib use




commit d7c66dd4387fb6c3e79d87a35264b99e7f21a477
Author: Ebrahim Byagowi <ebrahim gnu org>
Date:   Wed Jul 29 07:15:59 2020 +0430

    Remove hb-glib use
    
    glib isn't hard dependency to harfbuzz so we like to make embedders be able
    to compile harfbuzz for Pango without hb-glib now that hb_glib_get_unicode_funcs
    use is gone releases ago.

 pango/pango-ot-private.h | 2 +-
 pango/pango-ot-tag.c     | 4 ++--
 pango/pangofc-shape.c    | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/pango/pango-ot-private.h b/pango/pango-ot-private.h
index 0d803ec17..d9d86644b 100644
--- a/pango/pango-ot-private.h
+++ b/pango/pango-ot-private.h
@@ -22,12 +22,12 @@
 #ifndef __PANGO_OT_PRIVATE_H__
 #define __PANGO_OT_PRIVATE_H__
 
+#include <glib.h>
 #include <glib-object.h>
 
 #include <pango/pango-ot.h>
 #include <hb-ot.h>
 #include <hb-ft.h>
-#include <hb-glib.h>
 
 #include "pangofc-private.h"
 
diff --git a/pango/pango-ot-tag.c b/pango/pango-ot-tag.c
index c4f337e8c..5f50b77c7 100644
--- a/pango/pango-ot-tag.c
+++ b/pango/pango-ot-tag.c
@@ -49,7 +49,7 @@ pango_ot_tag_from_script (PangoScript script)
   unsigned int count = 1;
   hb_tag_t tags[1];
 
-  hb_ot_tags_from_script_and_language (hb_glib_script_to_script ((GUnicodeScript)script),
+  hb_ot_tags_from_script_and_language ((hb_script_t) g_unicode_script_to_iso15924 ((GUnicodeScript) script),
                                        HB_LANGUAGE_INVALID,
                                        &count,
                                        tags,
@@ -84,7 +84,7 @@ pango_ot_tag_from_script (PangoScript script)
 PangoScript
 pango_ot_tag_to_script (PangoOTTag script_tag)
 {
-  return (PangoScript) hb_glib_script_from_script (hb_ot_tag_to_script ((hb_tag_t) script_tag));
+  return (PangoScript) g_unicode_script_from_iso15924 (hb_ot_tag_to_script ((hb_tag_t) script_tag));
 }
 
 
diff --git a/pango/pangofc-shape.c b/pango/pangofc-shape.c
index 9fe193f66..b6f74ca10 100644
--- a/pango/pangofc-shape.c
+++ b/pango/pangofc-shape.c
@@ -29,7 +29,7 @@
 #include "pangohb-private.h"
 #include "pango-impl-utils.h"
 
-#include <hb-glib.h>
+#include <glib.h>
 
 /* cache a single hb_buffer_t */
 static hb_buffer_t *cached_buffer = NULL; /* MT-safe */
@@ -359,7 +359,7 @@ pango_hb_shape (PangoFont           *font,
   /* setup buffer */
 
   hb_buffer_set_direction (hb_buffer, hb_direction);
-  hb_buffer_set_script (hb_buffer, hb_glib_script_to_script (analysis->script));
+  hb_buffer_set_script (hb_buffer, (hb_script_t) g_unicode_script_to_iso15924 (analysis->script));
   hb_buffer_set_language (hb_buffer, hb_language_from_string (pango_language_to_string (analysis->language), 
-1));
   hb_buffer_set_cluster_level (hb_buffer, HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS);
   hb_buffer_set_flags (hb_buffer, hb_buffer_flags);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]