# HG changeset patch # User Kenichi Handa # Date 1211713331 0 # Node ID 5ad7b7aaa2a51705f45160a0b61491a914e435cb # Parent e3e5f8759ca5d9b3a36648aa5947de866a5b1523 (face_for_char): Optimize for the case of no charset property. diff -r e3e5f8759ca5 -r 5ad7b7aaa2a5 src/fontset.c --- a/src/fontset.c Sun May 25 11:00:52 2008 +0000 +++ b/src/fontset.c Sun May 25 11:02:11 2008 +0000 @@ -908,6 +908,17 @@ id = XINT (CHARSET_SYMBOL_ID (charset)); } } + if (id < 0) + { + struct font *font = face->ascii_face->font; + + if (font && font->driver->encode_char (font, c) != FONT_INVALID_CODE) + return face->ascii_face->id; + font = face->font; + if (font && font->driver->encode_char (font, c) != FONT_INVALID_CODE) + return face->id; + } + rfont_def = fontset_font (fontset, c, face, id); if (VECTORP (rfont_def)) {