aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2008-06-09 07:19:19 +0000
committerKenichi Handa2008-06-09 07:19:19 +0000
commit9e1bb909ea563b985fb3b26734d3477138aac026 (patch)
tree7c307ee1a122e1e5e4e3b18dc5d1ec0b0f6cf4c5
parent770835fda420b46e8600f6a2435964b9bc425885 (diff)
downloademacs-9e1bb909ea563b985fb3b26734d3477138aac026.tar.gz
emacs-9e1bb909ea563b985fb3b26734d3477138aac026.zip
(Qascii_0): New variable.
(syms_of_font): DEFSYM it. (font_open_by_name): If the registry "iso8859-1" fails, try also "ascii-0".
-rw-r--r--src/ChangeLog9
-rw-r--r--src/font.c15
2 files changed, 20 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 002a0d8af41..2d80e37cb35 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12008-06-09 Kenichi Handa <handa@m17n.org>
2
3 * font.c (Qascii_0): New variable.
4 (syms_of_font): DEFSYM it.
5 (font_open_by_name): If the registry "iso8859-1" fails, try also
6 "ascii-0".
7
8 * ftfont.c (ftfont_spec_pattern): Accept the registry `ascii-0'.
9
12008-06-08 Kenichi Handa <handa@m17n.org> 102008-06-08 Kenichi Handa <handa@m17n.org>
2 11
3 * .gdbinit (xfont): New command. 12 * .gdbinit (xfont): New command.
diff --git a/src/font.c b/src/font.c
index 3c28f8e10e9..763141a1ffa 100644
--- a/src/font.c
+++ b/src/font.c
@@ -55,7 +55,7 @@ Lisp_Object Qfont_spec, Qfont_entity, Qfont_object;
55Lisp_Object Qopentype; 55Lisp_Object Qopentype;
56 56
57/* Important character set strings. */ 57/* Important character set strings. */
58Lisp_Object Qiso8859_1, Qiso10646_1, Qunicode_bmp, Qunicode_sip; 58Lisp_Object Qascii_0, Qiso8859_1, Qiso10646_1, Qunicode_bmp, Qunicode_sip;
59 59
60/* Special vector of zero length. This is repeatedly used by (struct 60/* Special vector of zero length. This is repeatedly used by (struct
61 font_driver *)->list when a specified font is not found. */ 61 font_driver *)->list when a specified font is not found. */
@@ -3009,7 +3009,7 @@ font_open_by_name (f, name)
3009 char *name; 3009 char *name;
3010{ 3010{
3011 Lisp_Object args[2]; 3011 Lisp_Object args[2];
3012 Lisp_Object spec, prefer, size, entity, entity_list; 3012 Lisp_Object spec, prefer, size, registry, entity, entity_list;
3013 Lisp_Object frame; 3013 Lisp_Object frame;
3014 int i; 3014 int i;
3015 int pixel_size; 3015 int pixel_size;
@@ -3049,10 +3049,16 @@ font_open_by_name (f, name)
3049 size = make_number (pixel_size); 3049 size = make_number (pixel_size);
3050 ASET (prefer, FONT_SIZE_INDEX, size); 3050 ASET (prefer, FONT_SIZE_INDEX, size);
3051 } 3051 }
3052 if (NILP (AREF (spec, FONT_REGISTRY_INDEX))) 3052 registry = AREF (spec, FONT_REGISTRY_INDEX);
3053 if (NILP (registry))
3053 ASET (spec, FONT_REGISTRY_INDEX, Qiso8859_1); 3054 ASET (spec, FONT_REGISTRY_INDEX, Qiso8859_1);
3054
3055 entity_list = Flist_fonts (spec, frame, make_number (1), prefer); 3055 entity_list = Flist_fonts (spec, frame, make_number (1), prefer);
3056 if (NILP (entity_list) && NILP (registry))
3057 {
3058 ASET (spec, FONT_REGISTRY_INDEX, Qascii_0);
3059 entity_list = Flist_fonts (spec, frame, make_number (1), prefer);
3060 }
3061 ASET (spec, FONT_REGISTRY_INDEX, registry);
3056 if (NILP (entity_list)) 3062 if (NILP (entity_list))
3057 entity = font_matching_entity (f, NULL, spec); 3063 entity = font_matching_entity (f, NULL, spec);
3058 else 3064 else
@@ -4524,6 +4530,7 @@ syms_of_font ()
4524 4530
4525 DEFSYM (Qopentype, "opentype"); 4531 DEFSYM (Qopentype, "opentype");
4526 4532
4533 DEFSYM (Qascii_0, "ascii-0");
4527 DEFSYM (Qiso8859_1, "iso8859-1"); 4534 DEFSYM (Qiso8859_1, "iso8859-1");
4528 DEFSYM (Qiso10646_1, "iso10646-1"); 4535 DEFSYM (Qiso10646_1, "iso10646-1");
4529 DEFSYM (Qunicode_bmp, "unicode-bmp"); 4536 DEFSYM (Qunicode_bmp, "unicode-bmp");