Mercurial > emacs
changeset 91224:3ce31df2ea58
(fontset_find_font): Don't prefer a font of
supplementary charset.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 10 Dec 2007 06:23:41 +0000 |
parents | fc0bc01543e2 |
children | a16d6764ef29 |
files | src/fontset.c |
diffstat | 1 files changed, 20 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fontset.c Mon Dec 10 01:47:57 2007 +0000 +++ b/src/fontset.c Mon Dec 10 06:23:41 2007 +0000 @@ -635,23 +635,30 @@ if (id < 0) i = 3; - else if (id == XFASTINT (AREF (vec, 1))) - i = 2; else { - ASET (vec, 1, make_number (id)); - for (i = 3; i < ASIZE (vec); i++) - if (id == XFASTINT (AREF (AREF (AREF (vec, i), 2), 1))) - break; - if (i < ASIZE (vec)) - { - ASET (vec, 2, AREF (vec, i)); - i = 2; - } + struct charset *charset = CHARSET_FROM_ID (id); + + if (charset->supplementary_p) + i = 3; + else if (id == XFASTINT (AREF (vec, 1))) + i = 2; else { - ASET (vec, 2, Qnil); - i = 3; + ASET (vec, 1, make_number (id)); + for (i = 3; i < ASIZE (vec); i++) + if (id == XFASTINT (AREF (AREF (AREF (vec, i), 2), 1))) + break; + if (i < ASIZE (vec)) + { + ASET (vec, 2, AREF (vec, i)); + i = 2; + } + else + { + ASET (vec, 2, Qnil); + i = 3; + } } }