(XLFD_LARGENUM_MASK): Delete XLFD_ENCODING_MASK from it.
(font_expand_wildcards): Fix handling ENCODING field. Avoid
unnecessary checks for weight, slant, and swidth.
(font_parse_fcname): New function.
(font_unparse_fcname): New function.
(font_parse_name): New function.
(font_match_p): New function.
(font_get_name): Return value changed to Lisp string.
(font_get_spec): New function.
(Qunspecified, Qignore_defface): Don't extern them.
(font_find_for_lface): Assume that LFACE is fully specified.
(font_load_for_face): If lface[LFACE_FONT_INDEX] is an font
object, use it for FACE.
(font_open_by_name): Call Ffont_spec with QCname prop. Don't call
driver->parse_name.
(Ffont_spec): Call font_parse_name, not font_parse_xlfd.
(Qsans__serif): New variables.
(ftfont_generic_family_list): New variable.
(syms_of_ftfont): Initialize the above variables.
(ftfont_pattern_entity): Argument NAME deleted.
(ftfont_list_generic_family): New function.
(ftfont_parse_name): Delete this function.
(ftfont_list): Try generic family only when FcFontList found no
font.
(ftfont_list_family): Fix args to FcObjectSetBuild.
object in attrs[LFACE_FONT_INDEX].
(set_lface_from_font_name): Cancel all changes for font-backend.
(set_lface_from_font_and_fontset) [USE_FONT_BACKEND]: New
function.
(Finternal_set_lisp_face_attribute): Accept a font object in
QCfont attribute.
(set_font_frame_param): Likewise.
(realize_default_face): Call set_lface_from_font_and_fontset.
XLFD_XXX_INDEX.
(enum xlfd_field_mask): New enum.
(intern_font_field): Argument changed. Caller changed. If digits
are followed by non-digits, return a symbol.
(font_expand_wildcards): New function.
(font_parse_xlfd): Fix wildcard handling.
(Ffont_spec): If :name is specified, reflect the info in the other
properties.
font.c.
(ftfont_pattern_entity): New function.
(ftfont_get_cache): Assume that freetype_font_cache is already
initialized.
(ftfont_list): Handle the case that a file is specified in font
name. Use ftfont_pattern_entity to generate entities.
(ftfont_has_char): Check if the pattern contains FC_CHARSET.
(syms_of_ftfont): Initialize freetype_font_cache.
the 3rd element of font_def is nil.
(fontset_font): For the default fontset, append one more fontset
elements for a script-based font specification. Don't add script
attribute on finding a font.
(new_fontset_from_font): Unconditionally set FONTSET_ASCII to the
font name.
(fontset_ascii_font): If a font can't be opened, return nil.
ftfont.c.
(font_unparse_xlfd): Fix argument type declaration. Append "*" if
registry doesn't specify encoding part.
(font_find_for_lface): Pay attention to LFACE_FONT_INDEX.
(font_open_by_name): At first try parsing the name.
(syms_of_font): Declare Qiso8859_1, Qiso10646_1, and Qunicode_bmp
as Lisp symbols.
(x_default_font_parameter) [USE_FONT_BACKEND]: New function.
(Fx_create_frame) [USE_FONT_BACKEND]: If enable_font_backend is
nonzero, register all available font drivers. Call
x_default_font_parameter for deciding a font.
(x_create_tip_frame) [USE_FONT_BACKEND]: Likewise.
(x_set_mouse_face_gc, x_set_glyph_string_clipping)
(x_set_glyph_string_clipping_exactly)
(x_compute_glyph_string_overhangs)
(x_draw_glyph_string_foreground)
(x_draw_composite_glyph_string_foreground, x_draw_glyph_string)
(x_free_frame_resources) [USE_FONT_BACKEND]: If
enable_font_backend is nonzero, use font-backend mechanism.
(x_new_fontset2) [USE_FONT_BACKEND]: New function.