Mercurial > emacs
comparison src/xfaces.c @ 83353:532e0a9335a9
Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Patches applied:
* lorentey@elte.hu--2004/emacs--cvs-trunk--0--base-0
tag of miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-474
* lorentey@elte.hu--2004/emacs--cvs-trunk--0--patch-1
Add CVS metadata files.
* lorentey@elte.hu--2004/emacs--cvs-trunk--0--patch-2
Update from CVS.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-393
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Sun, 04 Sep 2005 03:48:17 +0000 |
parents | 6c13700d1c13 a0d1312ede66 |
children | 46dfd959d88a |
comparison
equal
deleted
inserted
replaced
83352:b258b3492423 | 83353:532e0a9335a9 |
---|---|
1 /* xfaces.c -- "Face" primitives. | 1 /* xfaces.c -- "Face" primitives. |
2 Copyright (C) 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 | 2 Copyright (C) 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
3 Free Software Foundation. | 3 2005 Free Software Foundation, Inc. |
4 | 4 |
5 This file is part of GNU Emacs. | 5 This file is part of GNU Emacs. |
6 | 6 |
7 GNU Emacs is free software; you can redistribute it and/or modify | 7 GNU Emacs is free software; you can redistribute it and/or modify |
8 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
783 | 783 |
784 #endif /* WINDOWSNT */ | 784 #endif /* WINDOWSNT */ |
785 | 785 |
786 #ifdef MAC_OS | 786 #ifdef MAC_OS |
787 /* Mac OS emulation of GCs */ | 787 /* Mac OS emulation of GCs */ |
788 | |
789 extern XGCValues *XCreateGC (void *, Window, unsigned long, XGCValues *); | |
790 | 788 |
791 static INLINE GC | 789 static INLINE GC |
792 x_create_gc (f, mask, xgcv) | 790 x_create_gc (f, mask, xgcv) |
793 struct frame *f; | 791 struct frame *f; |
794 unsigned long mask; | 792 unsigned long mask; |
3924 | 3922 |
3925 | 3923 |
3926 DEFUN ("internal-lisp-face-p", Finternal_lisp_face_p, | 3924 DEFUN ("internal-lisp-face-p", Finternal_lisp_face_p, |
3927 Sinternal_lisp_face_p, 1, 2, 0, | 3925 Sinternal_lisp_face_p, 1, 2, 0, |
3928 doc: /* Return non-nil if FACE names a face. | 3926 doc: /* Return non-nil if FACE names a face. |
3929 If optional second parameter FRAME is non-nil, check for the | 3927 If optional second argument FRAME is non-nil, check for the |
3930 existence of a frame-local face with name FACE on that frame. | 3928 existence of a frame-local face with name FACE on that frame. |
3931 Otherwise check for the existence of a global face. */) | 3929 Otherwise check for the existence of a global face. */) |
3932 (face, frame) | 3930 (face, frame) |
3933 Lisp_Object face, frame; | 3931 Lisp_Object face, frame; |
3934 { | 3932 { |
4733 { | 4731 { |
4734 #ifdef USE_MOTIF | 4732 #ifdef USE_MOTIF |
4735 const char *suffix = "List"; | 4733 const char *suffix = "List"; |
4736 Bool motif = True; | 4734 Bool motif = True; |
4737 #else | 4735 #else |
4736 #if defined HAVE_X_I18N | |
4737 | |
4738 const char *suffix = "Set"; | |
4739 #else | |
4738 const char *suffix = ""; | 4740 const char *suffix = ""; |
4741 #endif | |
4739 Bool motif = False; | 4742 Bool motif = False; |
4740 #endif | 4743 #endif |
4741 #if defined HAVE_X_I18N | 4744 #if defined HAVE_X_I18N |
4742 extern char *xic_create_fontsetname | 4745 extern char *xic_create_fontsetname |
4743 P_ ((char *base_fontname, Bool motif)); | 4746 P_ ((char *base_fontname, Bool motif)); |
6755 | 6758 |
6756 if (STRINGP (try_family)) | 6759 if (STRINGP (try_family)) |
6757 nfonts = try_alternative_families (f, try_family, registry, fonts); | 6760 nfonts = try_alternative_families (f, try_family, registry, fonts); |
6758 | 6761 |
6759 #ifdef MAC_OS | 6762 #ifdef MAC_OS |
6760 /* When realizing the default face and a font spec does not matched | 6763 if (nfonts == 0 && STRINGP (try_family) && STRINGP (registry)) |
6761 exactly, Emacs looks for ones with the same registry as the | 6764 if (xstricmp (SDATA (registry), "mac-roman") == 0) |
6762 default font. On the Mac, this is mac-roman, which does not work | 6765 /* When realizing the default face and a font spec does not |
6763 if the family is -etl-fixed, e.g. The following widens the | 6766 matched exactly, Emacs looks for ones with the same registry |
6764 choices and fixes that problem. */ | 6767 as the default font. On the Mac, this is mac-roman, which |
6765 if (nfonts == 0 && STRINGP (try_family) && STRINGP (registry) | 6768 does not work if the family is -etl-fixed, e.g. The |
6766 && xstricmp (SDATA (registry), "mac-roman") == 0) | 6769 following widens the choices and fixes that problem. */ |
6767 nfonts = try_alternative_families (f, try_family, Qnil, fonts); | 6770 nfonts = try_alternative_families (f, try_family, Qnil, fonts); |
6771 else if (SBYTES (try_family) > 0 | |
6772 && SREF (try_family, SBYTES (try_family) - 1) != '*') | |
6773 /* Some Central European/Cyrillic font family names have the | |
6774 Roman counterpart name as their prefix. */ | |
6775 nfonts = try_alternative_families (f, concat2 (try_family, | |
6776 build_string ("*")), | |
6777 registry, fonts); | |
6768 #endif | 6778 #endif |
6769 | 6779 |
6770 if (EQ (try_family, family)) | 6780 if (EQ (try_family, family)) |
6771 family = face_family; | 6781 family = face_family; |
6772 | 6782 |