aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhaled Hosny2018-09-12 11:04:17 +0200
committerKhaled Hosny2018-12-10 00:08:50 +0200
commit981b3d292aff49452c2b5f0217b57ec1a2829a8b (patch)
tree174e65e36d94507058193b5a7268a1f67c25a39c
parent0a1e695fe34171f767d5cd7aabd31a4ebfdda6f2 (diff)
downloademacs-981b3d292aff49452c2b5f0217b57ec1a2829a8b.tar.gz
emacs-981b3d292aff49452c2b5f0217b57ec1a2829a8b.zip
Fix uni_combining()
-rw-r--r--src/ftfont.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/ftfont.c b/src/ftfont.c
index 46f32e0f5fe..a645bbf0294 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -2690,16 +2690,14 @@ ftfont_variation_glyphs (struct font *font, int c, unsigned variations[256])
2690static hb_unicode_combining_class_t 2690static hb_unicode_combining_class_t
2691uni_combining (hb_unicode_funcs_t *funcs, hb_codepoint_t ch, void *user_data) 2691uni_combining (hb_unicode_funcs_t *funcs, hb_codepoint_t ch, void *user_data)
2692{ 2692{
2693 /* FIXME: Is it OK to load the table each time like this? */ 2693 Lisp_Object table, combining;
2694 Lisp_Object table = uniprop_table (intern ("canonical-combining-class")); 2694
2695 if (!NILP (table)) 2695 /* FIXME: Is it efficient to load the table each time? */
2696 { 2696 table = Funicode_property_table_internal (intern ("canonical-combining-class"));
2697 /* FIXME: something is wrong here, the classes we are getting do not make 2697 combining = Fget_unicode_property_internal (table, make_fixnum (ch));
2698 * sense. */ 2698
2699 Lisp_Object combining = CHAR_TABLE_REF (table, ch); 2699 if (INTEGERP (combining))
2700 if (INTEGERP (combining)) 2700 return (hb_unicode_combining_class_t) XFIXNUM (combining);
2701 return (hb_unicode_combining_class_t) XFIXNUM (combining);
2702 }
2703 2701
2704 return HB_UNICODE_COMBINING_CLASS_NOT_REORDERED; 2702 return HB_UNICODE_COMBINING_CLASS_NOT_REORDERED;
2705} 2703}