[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/src fontset.c
From: |
Kenichi Handa |
Subject: |
[Emacs-diffs] emacs/src fontset.c |
Date: |
Mon, 30 Mar 2009 12:50:51 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Kenichi Handa <handa> 09/03/30 12:50:51
Modified files:
src : fontset.c
Log message:
(fontset_from_font): Specify only registry in a font-spec for all
characters supported by that registry.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/fontset.c?cvsroot=emacs&r1=1.165&r2=1.166
Patches:
Index: fontset.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/fontset.c,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -b -r1.165 -r1.166
--- fontset.c 19 Mar 2009 06:50:41 -0000 1.165
+++ fontset.c 30 Mar 2009 12:50:50 -0000 1.166
@@ -1729,7 +1729,14 @@
/* Number of automatically created fontsets. */
static int num_auto_fontsets;
-/* Retun a fontset synthesized from FONT-OBJECT. */
+/* Retun a fontset synthesized from FONT-OBJECT. This is called from
+ x_new_font when FONT-OBJECT is used for the default ASCII font of a
+ frame, and the returned fontset is used for the default fontset of
+ that frame. The fontset specifies a font of the same registry as
+ FONT-OBJECT for all characters in the repertory of the registry
+ (see Vfont_encoding_alist). If the repertory is not known, the
+ fontset specifies the font for all Latin characters assuming that a
+ user intends to use FONT-OBJECT for Latin characters. */
int
fontset_from_font (font_object)
@@ -1765,17 +1772,19 @@
alias = Fdowncase (AREF (font_object, FONT_NAME_INDEX));
Vfontset_alias_alist = Fcons (Fcons (name, alias), Vfontset_alias_alist);
auto_fontset_alist = Fcons (Fcons (font_spec, fontset), auto_fontset_alist);
- font_spec = Fcopy_font_spec (font_spec);
- for (i = FONT_WEIGHT_INDEX; i < FONT_EXTRA_INDEX; i++)
- ASET (font_spec, i, Qnil);
- Fset_fontset_font (name, Qlatin, font_spec, Qnil, Qnil);
- Fset_fontset_font (name, Qnil, font_spec, Qnil, Qnil);
- if (!EQ (registry, Qiso10646_1))
+ font_spec = Ffont_spec (0, NULL);
+ ASET (font_spec, FONT_REGISTRY_INDEX, registry);
{
- font_spec = Fcopy_font_spec (font_spec);
- ASET (font_spec, FONT_REGISTRY_INDEX, Qiso10646_1);
- Fset_fontset_font (name, Qlatin, font_spec, Qnil, Qappend);
+ Lisp_Object target = find_font_encoding (SYMBOL_NAME (registry));
+
+ if (CONSP (target))
+ target = XCDR (target);
+ if (! CHARSETP (target))
+ target = Qlatin;
+ Fset_fontset_font (name, target, font_spec, Qnil, Qnil);
+ Fset_fontset_font (name, Qnil, font_spec, Qnil, Qnil);
}
+
FONTSET_ASCII (fontset) = font_name;
#ifdef HAVE_NS
- [Emacs-diffs] emacs/src fontset.c, Kenichi Handa, 2009/03/05
- [Emacs-diffs] emacs/src fontset.c, Kenichi Handa, 2009/03/05
- [Emacs-diffs] emacs/src fontset.c, Kenichi Handa, 2009/03/11
- [Emacs-diffs] emacs/src fontset.c, Kenichi Handa, 2009/03/13
- [Emacs-diffs] emacs/src fontset.c, Stefan Monnier, 2009/03/13
- [Emacs-diffs] emacs/src fontset.c, Kenichi Handa, 2009/03/19
- [Emacs-diffs] emacs/src fontset.c,
Kenichi Handa <=