emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/xterm.c [emacs-unicode-2]


From: Kenichi Handa
Subject: [Emacs-diffs] Changes to emacs/src/xterm.c [emacs-unicode-2]
Date: Mon, 06 Oct 2003 07:23:28 -0400

Index: emacs/src/xterm.c
diff -c emacs/src/xterm.c:1.804.2.3 emacs/src/xterm.c:1.804.2.4
*** emacs/src/xterm.c:1.804.2.3 Fri Sep 26 13:28:30 2003
--- emacs/src/xterm.c   Mon Oct  6 07:23:25 2003
***************
*** 10066,10075 ****
  
  
  /* Return a char-table whose elements are t if the font FONT_INFO
!    contains a glyph for the corresponding character, and nil if not.
! 
!    Fixme: For the moment, this function works only for fonts whose
!    glyph encoding is the same as Unicode (e.g. ISO10646-1 fonts).  */
  
  Lisp_Object
  x_get_font_repertory (f, font_info)
--- 10066,10073 ----
  
  
  /* Return a char-table whose elements are t if the font FONT_INFO
!    contains a glyph for the corresponding character, and nil if
!    not.  */
  
  Lisp_Object
  x_get_font_repertory (f, font_info)
***************
*** 10079,10084 ****
--- 10077,10085 ----
    XFontStruct *font = (XFontStruct *) font_info->font;
    Lisp_Object table;
    int min_byte1, max_byte1, min_byte2, max_byte2;
+   int c;
+   struct charset *charset = (font_info->charset == charset_unicode
+                            ? NULL : CHARSET_FROM_ID (font_info->charset));
  
    table = Fmake_char_table (Qnil, Qnil);
  
***************
*** 10102,10108 ****
                {
                  if (from >= 0)
                    {
!                     char_table_set_range (table, from, i - 1, Qt);
                      from = -1;
                    }
                }
--- 10103,10116 ----
                {
                  if (from >= 0)
                    {
!                     if (! charset)
!                       char_table_set_range (table, from, i - 1, Qt);
!                     else
!                       for (; from < i; from++)
!                         {
!                           c = ENCODE_CHAR (charset, from);
!                           CHAR_TABLE_SET (table, c, Qt);
!                         }
                      from = -1;
                    }
                }
***************
*** 10110,10128 ****
                from = i;
            }
          if (from >= 0)
!           char_table_set_range (table, from, i - 1, Qt);
        }
      }
    else
      {
        if (! font->per_char || font->all_chars_exist == True)
        {
!         int i;
  
!         for (i = min_byte1; i <= max_byte1; i++)
!           char_table_set_range (table,
!                                 (i << 8) | min_byte2, (i << 8) | max_byte2,
!                                 Qt);
        }
        else
        {
--- 10118,10153 ----
                from = i;
            }
          if (from >= 0)
!           {
!             if (! charset)
!               char_table_set_range (table, from, i - 1, Qt);
!             else
!               for (; from < i; from++)
!                 {
!                   c = ENCODE_CHAR (charset, from);
!                   CHAR_TABLE_SET (table, c, Qt);
!                 }
!           }
        }
      }
    else
      {
        if (! font->per_char || font->all_chars_exist == True)
        {
!         int i, j;
  
!         if (! charset)
!           for (i = min_byte1; i <= max_byte1; i++)
!             char_table_set_range (table,
!                                   (i << 8) | min_byte2, (i << 8) | max_byte2,
!                                   Qt);
!         else
!           for (i = min_byte1; i <= max_byte1; i++)        
!             for (j = min_byte2; j <= max_byte2; j++)
!               {
!                 unsigned code = (i << 8) | j;
!                 c = ENCODE_CHAR (charset, code);
!               }
        }
        else
        {
***************
*** 10140,10147 ****
                    {
                      if (from >= 0)
                        {
!                         char_table_set_range (table, (i << 8) | from,
!                                               (i << 8) | (j - 1), Qt);
                          from = -1;
                        }
                    }
--- 10165,10182 ----
                    {
                      if (from >= 0)
                        {
!                         if (! charset)
!                           char_table_set_range (table, (i << 8) | from,
!                                                 (i << 8) | (j - 1), Qt);
!                         else
!                           {
!                             for (; from < j; from++)
!                               {
!                                 unsigned code = (i << 8) | from;
!                                 c = ENCODE_CHAR (charset, code);
!                                 CHAR_TABLE_SET (table, c, Qt);
!                               }
!                           }
                          from = -1;
                        }
                    }
***************
*** 10149,10156 ****
                    from = j;
                }
              if (from >= 0)
!               char_table_set_range (table, (i << 8) | from,
!                                     (i << 8) | (j - 1), Qt);
            }
        }
      }
--- 10184,10203 ----
                    from = j;
                }
              if (from >= 0)
!               {
!                 if (! charset)
!                   char_table_set_range (table, (i << 8) | from,
!                                         (i << 8) | (j - 1), Qt);
!                 else
!                   {
!                     for (; from < j; from++)
!                       {
!                         unsigned code = (i << 8) | from;
!                         c = ENCODE_CHAR (charset, code);
!                         CHAR_TABLE_SET (table, c, Qt);
!                       }
!                   }
!               }
            }
        }
      }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]