… | |
… | |
818 | // this loop only iterates when the guessed font-size is too small |
818 | // this loop only iterates when the guessed font-size is too small |
819 | for (;;) |
819 | for (;;) |
820 | { |
820 | { |
821 | font_weight *best = fonts + count - 1; |
821 | font_weight *best = fonts + count - 1; |
822 | |
822 | |
823 | for (font_weight *w = best; w-- > fonts; ) |
823 | for (font_weight *w = fonts; w < best; w++) |
824 | if (w->diff <= best->diff) |
824 | if (w->diff <= best->diff) |
825 | best = w; |
825 | best = w; |
826 | |
826 | |
827 | if (!best->name |
827 | if (!best->name |
828 | || !(f = XLoadQueryFont (disp, best->name))) |
828 | || !(f = XLoadQueryFont (disp, best->name))) |
… | |
… | |
924 | } |
924 | } |
925 | #endif |
925 | #endif |
926 | |
926 | |
927 | width = 1; |
927 | width = 1; |
928 | |
928 | |
929 | for (uint16_t *t = extent_test_chars + ecb_array_length (extent_test_chars); t-- > extent_test_chars; ) |
929 | for (uint16_t *t = extent_test_chars; t < extent_test_chars + ecb_array_length (extent_test_chars); t++) |
930 | { |
930 | { |
931 | if (FROM_UNICODE (cs, *t) == NOCHAR) |
931 | if (FROM_UNICODE (cs, *t) == NOCHAR) |
932 | continue; |
932 | continue; |
933 | |
933 | |
934 | // ignore characters we wouldn't use anyways |
934 | // ignore characters we wouldn't use anyways |
… | |
… | |
1246 | |
1246 | |
1247 | XftUnlockFace (f); |
1247 | XftUnlockFace (f); |
1248 | |
1248 | |
1249 | int glheight = height; |
1249 | int glheight = height; |
1250 | |
1250 | |
1251 | for (uint16_t *t = extent_test_chars + ecb_array_length (extent_test_chars); t-- > extent_test_chars; ) |
1251 | for (uint16_t *t = extent_test_chars; t < extent_test_chars + ecb_array_length (extent_test_chars); t++) |
1252 | { |
1252 | { |
1253 | FcChar16 ch = *t; |
1253 | FcChar16 ch = *t; |
1254 | |
1254 | |
1255 | if (cs != CS_UNICODE |
1255 | if (cs != CS_UNICODE |
1256 | && ch > 0x100 |
1256 | && ch > 0x100 |