]> code.delx.au - gnu-emacs/blobdiff - src/composite.c
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-69
[gnu-emacs] / src / composite.c
index 683330731ed602973e8b9d2fc1f0ea1e0c0ec99a..17144f25cd468beeb08e5b8b96b2c68e6c23fb9c 100644 (file)
@@ -336,7 +336,7 @@ get_composition_id (charpos, bytepos, nchars, prop, string)
 
       for (i = 1; i < glyph_len; i += 2)
        {
-         int rule, gref, nref;
+         int rule, gref, nref, xoff, yoff;
          int this_width;
          float this_left;
 
@@ -358,7 +358,7 @@ get_composition_id (charpos, bytepos, nchars, prop, string)
                |       |
                6---7---8 -- descent
          */
-         COMPOSITION_DECODE_RULE (rule, gref, nref);
+         COMPOSITION_DECODE_RULE (rule, gref, nref, xoff, yoff);
          this_left = (leftmost
                       + (gref % 3) * (rightmost - leftmost) / 2.0
                       - (nref % 3) * this_width / 2.0);
@@ -755,7 +755,12 @@ syms_of_composite ()
     args[0] = QCtest;
     args[1] = Qequal;
     args[2] = QCweakness;
-    args[3] = Qt;
+    /* We used to make the hash table weak so that unreferenced
+       compostions can be garbage-collected.  But, usually once
+       created compositions are repeatedly used in an Emacs session,
+       and thus it's not worth to save memory in such a way.  So, we
+       make the table not weak.  */
+    args[3] = Qnil;
     args[4] = QCsize;
     args[5] = make_number (311);
     composition_hash_table = Fmake_hash_table (6, args);
@@ -803,3 +808,6 @@ the string.  */);
   defsubr (&Scompose_string_internal);
   defsubr (&Sfind_composition_internal);
 }
+
+/* arch-tag: 79cefaf8-ca48-4eed-97e5-d5afb290d272
+   (do not change this comment) */