comparison src/fontset.c @ 97556:0fc47f017980

(reorder_font_vector): Use encoding charset of fonts for sorting. (face_for_char): Use deferred log.
author Kenichi Handa <handa@m17n.org>
date Tue, 19 Aug 2008 07:45:55 +0000
parents cc7d396b5612
children 991e41e2d92a
comparison
equal deleted inserted replaced
97555:12c8fcc4c171 97556:0fc47f017980
417 Lisp_Object font_spec = FONT_DEF_SPEC (font_def); 417 Lisp_Object font_spec = FONT_DEF_SPEC (font_def);
418 int score = RFONT_DEF_SCORE (rfont_def) & 0xFF; 418 int score = RFONT_DEF_SCORE (rfont_def) & 0xFF;
419 419
420 if (! font_match_p (font_spec, font_object)) 420 if (! font_match_p (font_spec, font_object))
421 { 421 {
422 Lisp_Object repertory = FONT_DEF_REPERTORY (font_def); 422 Lisp_Object encoding = FONT_DEF_ENCODING (font_def);
423 423
424 if (! NILP (repertory)) 424 if (! NILP (encoding))
425 { 425 {
426 Lisp_Object tail; 426 Lisp_Object tail;
427 427
428 for (tail = Vcharset_ordered_list; 428 for (tail = Vcharset_ordered_list;
429 ! EQ (tail, Vcharset_non_preferred_head) && CONSP (tail); 429 ! EQ (tail, Vcharset_non_preferred_head) && CONSP (tail);
430 score += 0x100, tail = XCDR (tail)) 430 score += 0x100, tail = XCDR (tail))
431 if (EQ (repertory, XCAR (tail))) 431 if (EQ (encoding, XCAR (tail)))
432 break; 432 break;
433 } 433 }
434 else 434 else
435 { 435 {
436 Lisp_Object lang = Ffont_get (font_spec, QClang); 436 Lisp_Object lang = Ffont_get (font_spec, QClang);
902 charset = XCDR (val); 902 charset = XCDR (val);
903 id = XINT (CHARSET_SYMBOL_ID (charset)); 903 id = XINT (CHARSET_SYMBOL_ID (charset));
904 } 904 }
905 } 905 }
906 906
907 font_add_log ("finding a font for", Fcons (make_number (c), charset), Qnil); 907 font_deferred_log ("font for", Fcons (make_number (c), charset), Qnil);
908 rfont_def = fontset_font (fontset, c, face, id); 908 rfont_def = fontset_font (fontset, c, face, id);
909 if (VECTORP (rfont_def)) 909 if (VECTORP (rfont_def))
910 { 910 {
911 if (INTEGERP (RFONT_DEF_FACE (rfont_def))) 911 if (INTEGERP (RFONT_DEF_FACE (rfont_def)))
912 face_id = XINT (RFONT_DEF_FACE (rfont_def)); 912 face_id = XINT (RFONT_DEF_FACE (rfont_def));