+2008-06-09 Kenichi Handa <handa@m17n.org>
+
+ * font.c (Qascii_0): New variable.
+ (syms_of_font): DEFSYM it.
+ (font_open_by_name): If the registry "iso8859-1" fails, try also
+ "ascii-0".
+
+ * ftfont.c (ftfont_spec_pattern): Accept the registry `ascii-0'.
+
2008-06-08 Kenichi Handa <handa@m17n.org>
* .gdbinit (xfont): New command.
Lisp_Object Qopentype;
/* Important character set strings. */
-Lisp_Object Qiso8859_1, Qiso10646_1, Qunicode_bmp, Qunicode_sip;
+Lisp_Object Qascii_0, Qiso8859_1, Qiso10646_1, Qunicode_bmp, Qunicode_sip;
/* Special vector of zero length. This is repeatedly used by (struct
font_driver *)->list when a specified font is not found. */
char *name;
{
Lisp_Object args[2];
- Lisp_Object spec, prefer, size, entity, entity_list;
+ Lisp_Object spec, prefer, size, registry, entity, entity_list;
Lisp_Object frame;
int i;
int pixel_size;
size = make_number (pixel_size);
ASET (prefer, FONT_SIZE_INDEX, size);
}
- if (NILP (AREF (spec, FONT_REGISTRY_INDEX)))
+ registry = AREF (spec, FONT_REGISTRY_INDEX);
+ if (NILP (registry))
ASET (spec, FONT_REGISTRY_INDEX, Qiso8859_1);
-
entity_list = Flist_fonts (spec, frame, make_number (1), prefer);
+ if (NILP (entity_list) && NILP (registry))
+ {
+ ASET (spec, FONT_REGISTRY_INDEX, Qascii_0);
+ entity_list = Flist_fonts (spec, frame, make_number (1), prefer);
+ }
+ ASET (spec, FONT_REGISTRY_INDEX, registry);
if (NILP (entity_list))
entity = font_matching_entity (f, NULL, spec);
else
DEFSYM (Qopentype, "opentype");
+ DEFSYM (Qascii_0, "ascii-0");
DEFSYM (Qiso8859_1, "iso8859-1");
DEFSYM (Qiso10646_1, "iso10646-1");
DEFSYM (Qunicode_bmp, "unicode-bmp");