More moving code around
authorBehdad Esfahbod <behdad@behdad.org>
Thu, 5 Apr 2012 20:46:46 +0000 (16:46 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Thu, 5 Apr 2012 20:46:46 +0000 (16:46 -0400)
src/hb-ot-shape-normalize.cc
src/hb-ot-shape-private.hh
src/hb-ot-shape.cc
src/hb-unicode-private.hh

index a754590..a1ad6d7 100644 (file)
@@ -145,7 +145,7 @@ decompose_multi_char_cluster (hb_ot_shape_context_t *c,
 {
   /* TODO Currently if there's a variation-selector we give-up, it's just too hard. */
   for (unsigned int i = c->buffer->idx; i < end; i++)
-    if (unlikely (is_variation_selector (c->buffer->info[i].codepoint))) {
+    if (unlikely (_hb_unicode_is_variation_selector (c->buffer->info[i].codepoint))) {
       while (c->buffer->idx < end)
        c->buffer->next_glyph ();
       return;
index 78564f8..7347377 100644 (file)
@@ -90,14 +90,6 @@ struct hb_ot_shape_context_t
 };
 
 
-static inline hb_bool_t
-is_variation_selector (hb_codepoint_t unicode)
-{
-  return unlikely ((unicode >=  0x180B && unicode <=  0x180D) || /* MONGOLIAN FREE VARIATION SELECTOR ONE..THREE */
-                  (unicode >=  0xFE00 && unicode <=  0xFE0F) || /* VARIATION SELECTOR-1..16 */
-                  (unicode >= 0xE0100 && unicode <= 0xE01EF));  /* VARIATION SELECTOR-17..256 */
-}
-
 static inline void
 hb_glyph_info_set_unicode_props (hb_glyph_info_t *info, hb_unicode_funcs_t *unicode)
 {
index 4275afc..d61eb75 100644 (file)
@@ -205,7 +205,7 @@ hb_map_glyphs (hb_font_t    *font,
 
   unsigned int count = buffer->len - 1;
   for (buffer->idx = 0; buffer->idx < count;) {
-    if (unlikely (is_variation_selector (buffer->info[buffer->idx + 1].codepoint))) {
+    if (unlikely (_hb_unicode_is_variation_selector (buffer->info[buffer->idx + 1].codepoint))) {
       hb_font_get_glyph (font, buffer->info[buffer->idx].codepoint, buffer->info[buffer->idx + 1].codepoint, &glyph);
       buffer->replace_glyph (glyph);
       buffer->skip_glyph ();
index 7fdf646..ad85be7 100644 (file)
@@ -106,5 +106,13 @@ HB_INTERNAL unsigned int
 _hb_unicode_modified_combining_class (hb_unicode_funcs_t *ufuncs,
                                      hb_codepoint_t      unicode);
 
+static inline hb_bool_t
+_hb_unicode_is_variation_selector (hb_codepoint_t unicode)
+{
+  return unlikely ((unicode >=  0x180B && unicode <=  0x180D) || /* MONGOLIAN FREE VARIATION SELECTOR ONE..THREE */
+                  (unicode >=  0xFE00 && unicode <=  0xFE0F) || /* VARIATION SELECTOR-1..16 */
+                  (unicode >= 0xE0100 && unicode <= 0xE01EF));  /* VARIATION SELECTOR-17..256 */
+}
+
 
 #endif /* HB_UNICODE_PRIVATE_HH */