emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/fontset.c


From: Kenichi Handa
Subject: [Emacs-diffs] Changes to emacs/src/fontset.c
Date: Thu, 28 Feb 2002 20:40:44 -0500

Index: emacs/src/fontset.c
diff -c emacs/src/fontset.c:1.64 emacs/src/fontset.c:1.65
*** emacs/src/fontset.c:1.64    Wed Nov 14 08:38:51 2001
--- emacs/src/fontset.c Wed Dec 12 15:06:10 2001
***************
*** 55,68 ****
     face is also realized for multibyte characters based on an ASCII
     face.  All of the multibyte faces based on the same ASCII face
     share the same realized fontset.
!    
     A fontset object is implemented by a char-table.
  
     An element of a base fontset is:
        (INDEX . FONTNAME) or
        (INDEX . (FOUNDRY . REGISTRY ))
     FONTNAME is a font name pattern for the corresponding character.
!    FOUNDRY and REGISTRY are respectively foundy and regisry fields of
     a font name for the corresponding character.  INDEX specifies for
     which character (or generic character) the element is defined.  It
     may be different from an index to access this element.  For
--- 55,68 ----
     face is also realized for multibyte characters based on an ASCII
     face.  All of the multibyte faces based on the same ASCII face
     share the same realized fontset.
! 
     A fontset object is implemented by a char-table.
  
     An element of a base fontset is:
        (INDEX . FONTNAME) or
        (INDEX . (FOUNDRY . REGISTRY ))
     FONTNAME is a font name pattern for the corresponding character.
!    FOUNDRY and REGISTRY are respectively foundry and registry fields of
     a font name for the corresponding character.  INDEX specifies for
     which character (or generic character) the element is defined.  It
     may be different from an index to access this element.  For
***************
*** 71,79 ****
     charset.  REGISTRY is the
  
     An element of a realized fontset is FACE-ID which is a face to use
!    for displaying the correspnding character.
  
!    All single byte charaters (ASCII and 8bit-unibyte) share the same
     element in a fontset.  The element is stored in the first element
     of the fontset.
  
--- 71,79 ----
     charset.  REGISTRY is the
  
     An element of a realized fontset is FACE-ID which is a face to use
!    for displaying the corresponding character.
  
!    All single byte characters (ASCII and 8bit-unibyte) share the same
     element in a fontset.  The element is stored in the first element
     of the fontset.
  
***************
*** 110,116 ****
     These structures are hidden from the other codes than this file.
     The other codes handle fontsets only by their ID numbers.  They
     usually use variable name `fontset' for IDs.  But, in this file, we
!    always use varialbe name `id' for IDs, and name `fontset' for the
     actual fontset objects.
  
  */
--- 110,116 ----
     These structures are hidden from the other codes than this file.
     The other codes handle fontsets only by their ID numbers.  They
     usually use variable name `fontset' for IDs.  But, in this file, we
!    always use variable name `id' for IDs, and name `fontset' for the
     actual fontset objects.
  
  */
***************
*** 123,129 ****
  /* Vector containing all fontsets.  */
  static Lisp_Object Vfontset_table;
  
! /* Next possibly free fontset ID.  Usually this keeps the mininum
     fontset ID not yet used.  */
  static int next_fontset_id;
  
--- 123,129 ----
  /* Vector containing all fontsets.  */
  static Lisp_Object Vfontset_table;
  
! /* Next possibly free fontset ID.  Usually this keeps the minimum
     fontset ID not yet used.  */
  static int next_fontset_id;
  
***************
*** 145,152 ****
  /* Return a pointer to struct font_info of font FONT_IDX of frame F.  */
  struct font_info *(*get_font_info_func) P_ ((FRAME_PTR f, int font_idx));
  
! /* Return a list of font names which matches PATTERN.  See the document of
!    `x-list-fonts' for more detail.  */
  Lisp_Object (*list_fonts_func) P_ ((struct frame *f,
                                    Lisp_Object pattern,
                                    int size,
--- 145,152 ----
  /* Return a pointer to struct font_info of font FONT_IDX of frame F.  */
  struct font_info *(*get_font_info_func) P_ ((FRAME_PTR f, int font_idx));
  
! /* Return a list of font names which matches PATTERN.  See the documentation
!    of `x-list-fonts' for more details.  */
  Lisp_Object (*list_fonts_func) P_ ((struct frame *f,
                                    Lisp_Object pattern,
                                    int size,
***************
*** 166,172 ****
  
  /* To find a CCL program, fs_load_font calls this function.
     The argument is a pointer to the struct font_info.
!    This function set the memer `encoder' of the structure.  */
  void (*find_ccl_program_func) P_ ((struct font_info *));
  
  /* Check if any window system is used now.  */
--- 166,172 ----
  
  /* To find a CCL program, fs_load_font calls this function.
     The argument is a pointer to the struct font_info.
!    This function set the member `encoder' of the structure.  */
  void (*find_ccl_program_func) P_ ((struct font_info *));
  
  /* Check if any window system is used now.  */
***************
*** 318,331 ****
    /* Find a free slot in Vfontset_table.  Usually, next_fontset_id is
       the next available fontset ID.  So it is expected that this loop
       terminates quickly.  In addition, as the last element of
!      Vfotnset_table is always nil, we don't have to check the range of
       id.  */
    while (!NILP (AREF (Vfontset_table, id))) id++;
  
    if (id + 1 == size)
      {
        Lisp_Object tem;
!       int i; 
  
        tem = Fmake_vector (make_number (size + 8), Qnil);
        for (i = 0; i < size; i++)
--- 318,331 ----
    /* Find a free slot in Vfontset_table.  Usually, next_fontset_id is
       the next available fontset ID.  So it is expected that this loop
       terminates quickly.  In addition, as the last element of
!      Vfontset_table is always nil, we don't have to check the range of
       id.  */
    while (!NILP (AREF (Vfontset_table, id))) id++;
  
    if (id + 1 == size)
      {
        Lisp_Object tem;
!       int i;
  
        tem = Fmake_vector (make_number (size + 8), Qnil);
        for (i = 0; i < size; i++)
***************
*** 373,379 ****
    char *p = XSTRING (fontname)->data;
    char *sep[15];
    int i = 0;
!   
    while (*p && i < 15)
      if (*p++ == '-')
        {
--- 373,379 ----
    char *p = XSTRING (fontname)->data;
    char *sep[15];
    int i = 0;
! 
    while (*p && i < 15)
      if (*p++ == '-')
        {
***************
*** 390,396 ****
  }
  
  
! /********** INTERFACES TO xfaces.c and dispextern.h **********/ 
  
  /* Return name of the fontset with ID.  */
  
--- 390,396 ----
  }
  
  
! /********** INTERFACES TO xfaces.c and dispextern.h **********/
  
  /* Return name of the fontset with ID.  */
  
***************
*** 481,487 ****
    /* No face is recorded for C in the fontset of FACE.  Make a new
       realized face for C that has the same fontset.  */
    face_id = lookup_face (f, face->lface, c, face);
!   
    /* Record the face ID in FONTSET at the same index as the
       information in the base fontset.  */
    FONTSET_SET (fontset, c, make_number (face_id));
--- 481,487 ----
    /* No face is recorded for C in the fontset of FACE.  Make a new
       realized face for C that has the same fontset.  */
    face_id = lookup_face (f, face->lface, c, face);
! 
    /* Record the face ID in FONTSET at the same index as the
       information in the base fontset.  */
    FONTSET_SET (fontset, c, make_number (face_id));
***************
*** 532,538 ****
  {
    Lisp_Object fontset, elt;
    struct font_info *fontp;
!   
    elt = Qnil;
    if (fontset_id_valid_p (id))
      {
--- 532,538 ----
  {
    Lisp_Object fontset, elt;
    struct font_info *fontp;
! 
    elt = Qnil;
    if (fontset_id_valid_p (id))
      {
***************
*** 634,640 ****
  
    fontp->vertical_centering
      = (STRINGP (Vvertical_centering_font_regexp)
!        && (fast_c_string_match_ignore_case 
           (Vvertical_centering_font_regexp, fontp->full_name) >= 0));
  
    if (fontp->encoding[1] != FONT_ENCODING_NOT_DECIDED)
--- 634,640 ----
  
    fontp->vertical_centering
      = (STRINGP (Vvertical_centering_font_regexp)
!        && (fast_c_string_match_ignore_case
           (Vvertical_centering_font_regexp, fontp->full_name) >= 0));
  
    if (fontp->encoding[1] != FONT_ENCODING_NOT_DECIDED)
***************
*** 828,834 ****
  
  /* Return a list of base fontset names matching PATTERN on frame F.
     If SIZE is not 0, it is the size (maximum bound width) of fontsets
!    to be listed. */
  
  Lisp_Object
  list_fontsets (f, pattern, size)
--- 828,834 ----
  
  /* Return a list of base fontset names matching PATTERN on frame F.
     If SIZE is not 0, it is the size (maximum bound width) of fontsets
!    to be listed.  */
  
  Lisp_Object
  list_fontsets (f, pattern, size)
***************
*** 983,989 ****
  for all character in the charsets.
  
  FONTNAME may be a cons; (FAMILY . REGISTRY), where FAMILY is a family
! name of a font, REGSITRY is a registry name of a font.  */)
       (name, character, fontname, frame)
       Lisp_Object name, character, fontname, frame;
  {
--- 983,989 ----
  for all character in the charsets.
  
  FONTNAME may be a cons; (FAMILY . REGISTRY), where FAMILY is a family
! name of a font, REGISTRY is a registry name of a font.  */)
       (name, character, fontname, frame)
       Lisp_Object name, character, fontname, frame;
  {
***************
*** 1247,1254 ****
      or a cons of two characters specifying the range of characters.
    FONT-SPEC is a fontname pattern string or a cons (FAMILY . REGISTRY),
      where FAMILY is a `FAMILY' field of a XLFD font name,
!     REGISTRY is a `CHARSET_REGISTRY' field of a XLDF font name.
!     FAMILY may contain a `FOUNDARY' field at the head.
      REGISTRY may contain a `CHARSET_ENCODING' field at the tail.
    OPENEDs are names of fonts actually opened.
  If the ASCII font is not yet opened, SIZE and HEIGHT are 0.
--- 1247,1254 ----
      or a cons of two characters specifying the range of characters.
    FONT-SPEC is a fontname pattern string or a cons (FAMILY . REGISTRY),
      where FAMILY is a `FAMILY' field of a XLFD font name,
!     REGISTRY is a `CHARSET_REGISTRY' field of a XLFD font name.
!     FAMILY may contain a `FOUNDRY' field at the head.
      REGISTRY may contain a `CHARSET_ENCODING' field at the tail.
    OPENEDs are names of fonts actually opened.
  If the ASCII font is not yet opened, SIZE and HEIGHT are 0.
***************
*** 1264,1270 ****
    struct font_info *fontp = NULL;
    int n_realized = 0;
    int i;
!   
    (*check_window_system_func) ();
  
    fontset = check_fontset_name (name);
--- 1264,1270 ----
    struct font_info *fontp = NULL;
    int n_realized = 0;
    int i;
! 
    (*check_window_system_func) ();
  
    fontset = check_fontset_name (name);
***************
*** 1368,1374 ****
  
    return elt;
  }
-   
  
  DEFUN ("fontset-list", Ffontset_list, Sfontset_list, 0, 0, 0,
         doc: /* Return a list of all defined fontset names.  */)
--- 1368,1373 ----
***************
*** 1471,1477 ****
               &Vvertical_centering_font_regexp,
               doc: /* *Regexp matching font names that require vertical 
centering on display.
  When a character is displayed with such fonts, the character is displayed
! at the vertival center of lines.  */);
    Vvertical_centering_font_regexp = Qnil;
  
    defsubr (&Squery_fontset);
--- 1470,1476 ----
               &Vvertical_centering_font_regexp,
               doc: /* *Regexp matching font names that require vertical 
centering on display.
  When a character is displayed with such fonts, the character is displayed
! at the vertical center of lines.  */);
    Vvertical_centering_font_regexp = Qnil;
  
    defsubr (&Squery_fontset);



reply via email to

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