aboutsummaryrefslogtreecommitdiff
path: root/ports/pango/0002-remove-hb-glib.diff
blob: 10234ae861bd0e56d07d1afc9fbbe3a3759fae5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
diff --git a/pango/pango-ot-buffer.c b/pango/pango-ot-buffer.c
index 142b2f17..334df746 100644
--- a/pango/pango-ot-buffer.c
+++ b/pango/pango-ot-buffer.c
@@ -40,7 +40,6 @@ pango_ot_buffer_new (PangoFcFont *font)
   PangoOTBuffer *buffer = g_slice_new (PangoOTBuffer);
 
   buffer->buffer = hb_buffer_create ();
-  hb_buffer_set_unicode_funcs (buffer->buffer, hb_glib_get_unicode_funcs ());
 
   return buffer;
 }
diff --git a/pango/pango-ot-private.h b/pango/pango-ot-private.h
index 0d803ec1..d9d86644 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 610b59d7..3bf4eccd 100644
--- a/pango/pango-ot-tag.c
+++ b/pango/pango-ot-tag.c
@@ -47,7 +47,8 @@ PangoOTTag
 pango_ot_tag_from_script (PangoScript script)
 {
   hb_tag_t tag1, tag2;
-  hb_ot_tags_from_script (hb_glib_script_to_script (script), &tag1, &tag2);
+  hb_ot_tags_from_script ((hb_script_t) g_unicode_script_to_iso15924 ((GUnicodeScript) script), 
+                          &tag1, &tag2);
   return (PangoOTTag) tag1;
 }
 
@@ -75,7 +76,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 60f829f3..4cb0ae04 100644
--- a/pango/pangofc-shape.c
+++ b/pango/pangofc-shape.c
@@ -28,7 +28,7 @@
 
 #include "pangofc-private.h"
 #include <hb-ft.h>
-#include <hb-glib.h>
+#include <glib.h>
 
 /* cache a single hb_buffer_t */
 static hb_buffer_t *cached_buffer = NULL; /* MT-safe */
@@ -362,7 +362,7 @@ _pango_fc_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));
 #if HB_VERSION_ATLEAST(1,0,3)
   hb_buffer_set_cluster_level (hb_buffer, HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS);