Changeset 4085 for trunk/src/xfaces.c
- Timestamp:
- 2006年05月18日 16時19分18秒 (3 years ago)
- Files:
-
- trunk/src/xfaces.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/xfaces.c
r4079 r4085 6453 6453 int i; 6454 6454 6455 /* Any font is better than no font. */ 6456 if (! font1) 6457 return 0; 6458 if (! font2) 6459 return 1; 6460 6455 6461 for (i = 0; i < DIM (font_sort_order); ++i) 6456 6462 { … … 6698 6704 *needs_overstrike = 0; 6699 6705 6700 /* Start with the first non-scalable font in the list. */ 6701 for (i = 0; i < nfonts; ++i) 6702 if (!font_scalable_p (fonts + i)) 6703 break; 6706 best = NULL; 6704 6707 6705 6708 /* Find the best match among the non-scalable fonts. */ 6706 if (i < nfonts) 6707 { 6708 best = fonts + i; 6709 6710 for (i = 1; i < nfonts; ++i) 6711 if (!font_scalable_p (fonts + i) 6712 && better_font_p (specified, fonts + i, best, 1, avgwidth)) 6713 { 6714 best = fonts + i; 6715 6716 exact_p = exact_face_match_p (specified, best, avgwidth); 6717 if (exact_p) 6718 break; 6719 } 6720 } 6721 else 6722 best = NULL; 6709 for (i = 1; i < nfonts; ++i) 6710 if (!font_scalable_p (fonts + i) 6711 && better_font_p (specified, fonts + i, best, 1, avgwidth)) 6712 { 6713 best = fonts + i; 6714 6715 exact_p = exact_face_match_p (specified, best, avgwidth); 6716 if (exact_p) 6717 break; 6718 } 6723 6719 6724 6720 /* Unless we found an exact match among non-scalable fonts, see if … … 6744 6740 if (font_scalable_p (fonts + i)) 6745 6741 { 6746 if (best == NULL 6747 || better_font_p (specified, fonts + i, best, 0, 0) 6742 if (better_font_p (specified, fonts + i, best, 0, 0) 6748 6743 || (!non_scalable_has_exact_height_p 6749 6744 && !better_font_p (specified, best, fonts + i, 0, 0))) … … 6772 6767 } 6773 6768 } 6769 6770 /* We should have found SOME font. */ 6771 if (best == NULL) 6772 abort (); 6774 6773 6775 6774 if (font_scalable_p (best))
