aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2008-05-25 11:02:11 +0000
committerKenichi Handa2008-05-25 11:02:11 +0000
commitb59e66b393afdc75407760b86deb61968cde07e1 (patch)
tree4a6104b0aa5803df4eaa0e69d6220b1be2894c85
parent6a3dadd2c2a658e30e86d994eb5d5f5950cb7a4d (diff)
downloademacs-b59e66b393afdc75407760b86deb61968cde07e1.tar.gz
emacs-b59e66b393afdc75407760b86deb61968cde07e1.zip
(face_for_char): Optimize for the case of no charset property.
-rw-r--r--src/fontset.c11
1 files changed, 11 insertions, 0 deletions
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)
908 id = XINT (CHARSET_SYMBOL_ID (charset)); 908 id = XINT (CHARSET_SYMBOL_ID (charset));
909 } 909 }
910 } 910 }
911 if (id < 0)
912 {
913 struct font *font = face->ascii_face->font;
914
915 if (font && font->driver->encode_char (font, c) != FONT_INVALID_CODE)
916 return face->ascii_face->id;
917 font = face->font;
918 if (font && font->driver->encode_char (font, c) != FONT_INVALID_CODE)
919 return face->id;
920 }
921
911 rfont_def = fontset_font (fontset, c, face, id); 922 rfont_def = fontset_font (fontset, c, face, id);
912 if (VECTORP (rfont_def)) 923 if (VECTORP (rfont_def))
913 { 924 {