/* Fontset handler.
- Copyright (C) 2004 Free Software Foundation, Inc.
- Copyright (C) 1995, 1997, 2000 Electrotechnical Laboratory, JAPAN.
- Licensed to the Free Software Foundation.
+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006, 2007, 2008
+ National Institute of Advanced Industrial Science and Technology (AIST)
+ Registration Number H14PRO021
This file is part of GNU Emacs.
GNU Emacs is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Emacs is distributed in the hope that it will be useful,
You should have received a copy of the GNU General Public License
along with GNU Emacs; see the file COPYING. If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA. */
/* #define FONTSET_DEBUG */
for (i = 0; code[i] > 0; i++)
{
if (!SUB_CHAR_TABLE_P (*elt))
- *elt = make_sub_char_table (*elt);
+ {
+ Lisp_Object val = *elt;
+ *elt = make_sub_char_table (Qnil);
+ XCHAR_TABLE (*elt)->defalt = val;
+ }
elt = &XCHAR_TABLE (*elt)->contents[code[i]];
}
if (SUB_CHAR_TABLE_P (*elt))
}
-/* Return 1 iff FACE is suitable for displaying character C.
+/* Return 1 if FACE is suitable for displaying character C.
Otherwise return 0. Called from the macro FACE_SUITABLE_FOR_CHAR_P
when C is not a single byte character.. */
#pragma optimize("", on)
#endif
+/* Set the ASCII font of the default fontset to FONTNAME if that is
+ not yet set. */
+void
+set_default_ascii_font (fontname)
+ Lisp_Object fontname;
+{
+ if (! CONSP (FONTSET_ASCII (Vdefault_fontset)))
+ {
+ int id = fs_query_fontset (fontname, 2);
+
+ if (id >= 0)
+ fontname = XCDR (FONTSET_ASCII (FONTSET_FROM_ID (id)));
+ FONTSET_ASCII (Vdefault_fontset)
+ = Fcons (make_number (0), fontname);
+ }
+}
+
\f
/* Cache data used by fontset_pattern_regexp. The car part is a
pattern string containing at least one wild card, the cdr part is
elt = Fcons (target, Fcons (Qnil, Fcons (Qnil, elt)));
XSETCAR (tail, elt);
}
+ if (! NILP (Fequal (fontlist, Voverriding_fontspec_alist)))
+ return Qnil;
Voverriding_fontspec_alist = fontlist;
clear_face_cache (0);
++windows_or_buffers_changed;
FONTSET_ID (Vdefault_fontset) = make_number (0);
FONTSET_NAME (Vdefault_fontset)
= build_string ("-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default");
-#if defined (MAC_OS)
- FONTSET_ASCII (Vdefault_fontset)
- = Fcons (make_number (0),
- build_string ("-apple-monaco-medium-r-*--*-120-*-*-*-*-mac-roman"));
-#elif defined (WINDOWSNT)
- FONTSET_ASCII (Vdefault_fontset)
- = Fcons (make_number (0),
- build_string ("-*-courier new-normal-r-*-*-*-100-*-*-*-*-iso8859-1"));
-#else
- FONTSET_ASCII (Vdefault_fontset)
- = Fcons (make_number (0),
- build_string ("-adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1"));
-#endif
AREF (Vfontset_table, 0) = Vdefault_fontset;
next_fontset_id = 1;