emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/src/xfaces.c
Date: Tue, 04 Feb 2003 09:03:55 -0500

Index: emacs/src/xfaces.c
diff -c emacs/src/xfaces.c:1.266 emacs/src/xfaces.c:1.267
*** emacs/src/xfaces.c:1.266    Sun Nov 17 18:51:19 2002
--- emacs/src/xfaces.c  Tue Feb  4 09:03:17 2003
***************
*** 494,500 ****
                            Lisp_Object, struct font_name **));
  static int font_list P_ ((struct frame *, Lisp_Object, Lisp_Object,
                          Lisp_Object, struct font_name **));
! static int try_font_list P_ ((struct frame *, Lisp_Object *, 
                              Lisp_Object, Lisp_Object, struct font_name **,
                              int));
  static int try_alternative_families P_ ((struct frame *f, Lisp_Object,
--- 494,500 ----
                            Lisp_Object, struct font_name **));
  static int font_list P_ ((struct frame *, Lisp_Object, Lisp_Object,
                          Lisp_Object, struct font_name **));
! static int try_font_list P_ ((struct frame *, Lisp_Object *,
                              Lisp_Object, Lisp_Object, struct font_name **,
                              int));
  static int try_alternative_families P_ ((struct frame *f, Lisp_Object,
***************
*** 974,986 ****
        || ++clear_font_table_count == CLEAR_FONT_TABLE_COUNT)
      {
        struct x_display_info *dpyinfo;
!       
        /* Fonts are common for frames on one display, i.e. on
         one X screen.  */
        for (dpyinfo = x_display_list; dpyinfo; dpyinfo = dpyinfo->next)
        if (dpyinfo->n_fonts > CLEAR_FONT_TABLE_NFONTS)
          clear_font_table (dpyinfo);
!       
        /* From time to time see if we can unload some fonts.  This also
         frees all realized faces on all frames.  Fonts needed by
         faces will be loaded again when faces are realized again.  */
--- 974,986 ----
        || ++clear_font_table_count == CLEAR_FONT_TABLE_COUNT)
      {
        struct x_display_info *dpyinfo;
! 
        /* Fonts are common for frames on one display, i.e. on
         one X screen.  */
        for (dpyinfo = x_display_list; dpyinfo; dpyinfo = dpyinfo->next)
        if (dpyinfo->n_fonts > CLEAR_FONT_TABLE_NFONTS)
          clear_font_table (dpyinfo);
! 
        /* From time to time see if we can unload some fonts.  This also
         frees all realized faces on all frames.  Fonts needed by
         faces will be loaded again when faces are realized again.  */
***************
*** 1401,1407 ****
    int status = 1;
  
    /* Defaults.  */
!   color_def->pixel = FACE_TTY_DEFAULT_COLOR; 
    color_def->red = 0;
    color_def->blue = 0;
    color_def->green = 0;
--- 1401,1407 ----
    int status = 1;
  
    /* Defaults.  */
!   color_def->pixel = FACE_TTY_DEFAULT_COLOR;
    color_def->red = 0;
    color_def->blue = 0;
    color_def->green = 0;
***************
*** 2238,2244 ****
      }
    else
      pixel = atoi (pixel_field);
!   
    if (pixel == 0)
      real_pt = 0;
    else
--- 2238,2244 ----
      }
    else
      pixel = atoi (pixel_field);
! 
    if (pixel == 0)
      real_pt = 0;
    else
***************
*** 2306,2312 ****
            {
              char *start, *end;
              int j;
!             
              for (++p; *p && *p != ']'; ++p)
                if (*p == '~')
                  *p = '-';
--- 2306,2312 ----
            {
              char *start, *end;
              int j;
! 
              for (++p; *p && *p != ']'; ++p)
                if (*p == '~')
                  *p = '-';
***************
*** 2689,2695 ****
  
     If REGISTRY is non-nil, return fonts with that registry and the
     alternative registries from Vface_alternative_font_registry_alist.
!    
     If REGISTRY is nil return fonts of any registry.
  
     Set *FONTS to a vector of font_name structures allocated from the
--- 2689,2695 ----
  
     If REGISTRY is non-nil, return fonts with that registry and the
     alternative registries from Vface_alternative_font_registry_alist.
! 
     If REGISTRY is nil return fonts of any registry.
  
     Set *FONTS to a vector of font_name structures allocated from the
***************
*** 2703,2709 ****
       struct font_name **fonts;
  {
    int nfonts = font_list_1 (f, pattern, family, registry, fonts);
!   
    if (!NILP (registry)
        && CONSP (Vface_alternative_font_registry_alist))
      {
--- 2703,2709 ----
       struct font_name **fonts;
  {
    int nfonts = font_list_1 (f, pattern, family, registry, fonts);
! 
    if (!NILP (registry)
        && CONSP (Vface_alternative_font_registry_alist))
      {
***************
*** 3167,3173 ****
    for (i = 1; i < LFACE_VECTOR_SIZE; ++i)
      if (i != LFACE_FONT_INDEX && i != LFACE_INHERIT_INDEX
        && i != LFACE_AVGWIDTH_INDEX)
!       if (UNSPECIFIEDP (attrs[i])) 
          break;
  
    return i == LFACE_VECTOR_SIZE;
--- 3167,3173 ----
    for (i = 1; i < LFACE_VECTOR_SIZE; ++i)
      if (i != LFACE_FONT_INDEX && i != LFACE_INHERIT_INDEX
        && i != LFACE_AVGWIDTH_INDEX)
!       if (UNSPECIFIEDP (attrs[i]))
          break;
  
    return i == LFACE_VECTOR_SIZE;
***************
*** 4308,4314 ****
      {
        Lisp_Object font_name;
        char *font;
!       
        if (STRINGP (LFACE_FONT (lface)))
        font_name = LFACE_FONT (lface);
        else
--- 4308,4314 ----
      {
        Lisp_Object font_name;
        char *font;
! 
        if (STRINGP (LFACE_FONT (lface)))
        font_name = LFACE_FONT (lface);
        else
***************
*** 4322,4328 ****
          font_name = build_string (font);
          xfree (font);
        }
!   
        Fmodify_frame_parameters (frame, Fcons (Fcons (Qfont, font_name), 
Qnil));
      }
  }
--- 4322,4328 ----
          font_name = build_string (font);
          xfree (font);
        }
! 
        Fmodify_frame_parameters (frame, Fcons (Fcons (Qfont, font_name), 
Qnil));
      }
  }
***************
*** 4524,4530 ****
  #else
        const char *popup_path = "menu.popup";
  #endif
!       
        if (STRINGP (LFACE_FOREGROUND (lface)))
        {
          sprintf (line, "%s.%s*foreground: %s",
--- 4524,4530 ----
  #else
        const char *popup_path = "menu.popup";
  #endif
! 
        if (STRINGP (LFACE_FOREGROUND (lface)))
        {
          sprintf (line, "%s.%s*foreground: %s",
***************
*** 4548,4554 ****
          XrmPutLineResource (&rdb, line);
          changed_p = 1;
        }
!         
        if (face->font_name
          && (!UNSPECIFIEDP (LFACE_FAMILY (lface))
              || !UNSPECIFIEDP (LFACE_SWIDTH (lface))
--- 4548,4554 ----
          XrmPutLineResource (&rdb, line);
          changed_p = 1;
        }
! 
        if (face->font_name
          && (!UNSPECIFIEDP (LFACE_FAMILY (lface))
              || !UNSPECIFIEDP (LFACE_SWIDTH (lface))
***************
*** 4579,4585 ****
  #endif /* HAVE_X_WINDOWS && USE_X_TOOLKIT */
  
  
! DEFUN ("face-attribute-relative-p", Fface_attribute_relative_p, 
         Sface_attribute_relative_p,
         2, 2, 0,
         doc: /* Return non-nil if face ATTRIBUTE VALUE is relative.  */)
--- 4579,4585 ----
  #endif /* HAVE_X_WINDOWS && USE_X_TOOLKIT */
  
  
! DEFUN ("face-attribute-relative-p", Fface_attribute_relative_p,
         Sface_attribute_relative_p,
         2, 2, 0,
         doc: /* Return non-nil if face ATTRIBUTE VALUE is relative.  */)
***************
*** 5252,5258 ****
        else if (weight < XLFD_WEIGHT_MEDIUM)
        test_caps = TTY_CAP_DIM;
      }
!       
    /* underlining */
    val = attrs[LFACE_UNDERLINE_INDEX];
    if (!UNSPECIFIEDP (val) && !NILP (val))
--- 5252,5258 ----
        else if (weight < XLFD_WEIGHT_MEDIUM)
        test_caps = TTY_CAP_DIM;
      }
! 
    /* underlining */
    val = attrs[LFACE_UNDERLINE_INDEX];
    if (!UNSPECIFIEDP (val) && !NILP (val))
***************
*** 6286,6292 ****
     REGISTRY, if a string, specifies a font registry and encoding to
     match.  A value of nil means include fonts of any registry and
     encoding.
!    
     Return in *FONTS a pointer to a vector of font_name structures for
     the fonts matched.  Value is the number of fonts found.  */
  
--- 6286,6292 ----
     REGISTRY, if a string, specifies a font registry and encoding to
     match.  A value of nil means include fonts of any registry and
     encoding.
! 
     Return in *FONTS a pointer to a vector of font_name structures for
     the fonts matched.  Value is the number of fonts found.  */
  
***************
*** 6314,6320 ****
                nfonts = font_list (f, Qnil, XCAR (alter), registry, fonts);
            }
        }
!       
        /* Try scalable fonts before giving up.  */
        if (nfonts == 0 && NILP (Vscalable_fonts_allowed))
        {
--- 6314,6320 ----
                nfonts = font_list (f, Qnil, XCAR (alter), registry, fonts);
            }
        }
! 
        /* Try scalable fonts before giving up.  */
        if (nfonts == 0 && NILP (Vscalable_fonts_allowed))
        {
***************
*** 6337,6343 ****
     REGISTRY, if a string, specifies a font registry and encoding to
     match.  A value of nil means include fonts of any registry and
     encoding.
!    
     If PREFER_FACE_FAMILY is nonzero, perfer face's family to FAMILY.
     Otherwise, prefer FAMILY.
  
--- 6337,6343 ----
     REGISTRY, if a string, specifies a font registry and encoding to
     match.  A value of nil means include fonts of any registry and
     encoding.
! 
     If PREFER_FACE_FAMILY is nonzero, perfer face's family to FAMILY.
     Otherwise, prefer FAMILY.
  
***************
*** 6388,6394 ****
        family = build_string ("fixed");
        nfonts = font_list (f, Qnil, family, registry, fonts);
      }
!       
    /* Try any family with the given registry.  */
    if (nfonts == 0)
      nfonts = font_list (f, Qnil, Qnil, registry, fonts);
--- 6388,6394 ----
        family = build_string ("fixed");
        nfonts = font_list (f, Qnil, family, registry, fonts);
      }
! 
    /* Try any family with the given registry.  */
    if (nfonts == 0)
      nfonts = font_list (f, Qnil, Qnil, registry, fonts);
***************
*** 6447,6453 ****
        xassert (!SINGLE_BYTE_CHAR_P (c));
        return NULL;
      }
!   
    /* If what we got is a name pattern, return it.  */
    if (STRINGP (pattern))
      return xstrdup (SDATA (pattern));
--- 6447,6453 ----
        xassert (!SINGLE_BYTE_CHAR_P (c));
        return NULL;
      }
! 
    /* If what we got is a name pattern, return it.  */
    if (STRINGP (pattern))
      return xstrdup (SDATA (pattern));
***************
*** 6510,6516 ****
          x_update_menu_appearance (f);
  #endif
        }
!       
        success_p = 1;
      }
  
--- 6510,6516 ----
          x_update_menu_appearance (f);
  #endif
        }
! 
        success_p = 1;
      }
  
***************
*** 6954,6963 ****
        pixel = default_pixel = FACE_TTY_DEFAULT_BG_COLOR;
        default_other_pixel = FACE_TTY_DEFAULT_FG_COLOR;
      }
!   
    XSETFRAME (frame, f);
    color = face->lface[idx];
!   
    if (STRINGP (color)
        && SCHARS (color)
        && CONSP (Vtty_defined_color_alist)
--- 6954,6963 ----
        pixel = default_pixel = FACE_TTY_DEFAULT_BG_COLOR;
        default_other_pixel = FACE_TTY_DEFAULT_FG_COLOR;
      }
! 
    XSETFRAME (frame, f);
    color = face->lface[idx];
! 
    if (STRINGP (color)
        && SCHARS (color)
        && CONSP (Vtty_defined_color_alist)
***************
*** 7052,7058 ****
    /* Map color names to color indices.  */
    map_tty_color (f, face, LFACE_FOREGROUND_INDEX, &face_colors_defaulted);
    map_tty_color (f, face, LFACE_BACKGROUND_INDEX, &face_colors_defaulted);
!   
    /* Swap colors if face is inverse-video.  If the colors are taken
       from the frame colors, they are already inverted, since the
       frame-creation function calls x-handle-reverse-video.  */
--- 7052,7058 ----
    /* Map color names to color indices.  */
    map_tty_color (f, face, LFACE_FOREGROUND_INDEX, &face_colors_defaulted);
    map_tty_color (f, face, LFACE_BACKGROUND_INDEX, &face_colors_defaulted);
! 
    /* Swap colors if face is inverse-video.  If the colors are taken
       from the frame colors, they are already inverted, since the
       frame-creation function calls x-handle-reverse-video.  */




reply via email to

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