From: Kenichi Handa Date: Sun, 25 May 2008 11:02:11 +0000 (+0000) Subject: (face_for_char): Optimize for the case of no charset property. X-Git-Tag: emacs-pretest-23.0.90~5306 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b59e66b393afdc75407760b86deb61968cde07e1;p=emacs.git (face_for_char): Optimize for the case of no charset property. --- diff --git a/src/fontset.c b/src/fontset.c index bafe1ca2255..c61bcae88af 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -908,6 +908,17 @@ face_for_char (f, face, c, pos, object) 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)) {