comparison src/fontset.c @ 110004:4cb81410d95d

Merge from mainline.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Wed, 25 Aug 2010 22:44:39 +0000
parents 35753506eda5
children a5a188ddc758
comparison
equal deleted inserted replaced
110003:336e4a38a76d 110004:4cb81410d95d
281 #define RFONT_DEF_SPEC(rfont_def) FONT_DEF_SPEC (AREF (rfont_def, 1)) 281 #define RFONT_DEF_SPEC(rfont_def) FONT_DEF_SPEC (AREF (rfont_def, 1))
282 #define RFONT_DEF_REPERTORY(rfont_def) FONT_DEF_REPERTORY (AREF (rfont_def, 1)) 282 #define RFONT_DEF_REPERTORY(rfont_def) FONT_DEF_REPERTORY (AREF (rfont_def, 1))
283 #define RFONT_DEF_OBJECT(rfont_def) AREF (rfont_def, 2) 283 #define RFONT_DEF_OBJECT(rfont_def) AREF (rfont_def, 2)
284 #define RFONT_DEF_SET_OBJECT(rfont_def, object) \ 284 #define RFONT_DEF_SET_OBJECT(rfont_def, object) \
285 ASET ((rfont_def), 2, (object)) 285 ASET ((rfont_def), 2, (object))
286 /* Score of RFONT_DEF is an integer value; the lowest 8 bits represent
287 the order of listing by font backends, the higher bits represents
288 the order given by charset priority list. The smaller value is
289 preferable. */
286 #define RFONT_DEF_SCORE(rfont_def) XINT (AREF (rfont_def, 3)) 290 #define RFONT_DEF_SCORE(rfont_def) XINT (AREF (rfont_def, 3))
287 #define RFONT_DEF_SET_SCORE(rfont_def, score) \ 291 #define RFONT_DEF_SET_SCORE(rfont_def, score) \
288 ASET ((rfont_def), 3, make_number (score)) 292 ASET ((rfont_def), 3, make_number (score))
289 #define RFONT_DEF_NEW(rfont_def, font_def) \ 293 #define RFONT_DEF_NEW(rfont_def, font_def) \
290 do { \ 294 do { \
410 { 414 {
411 Lisp_Object rfont_def = AREF (vec, i); 415 Lisp_Object rfont_def = AREF (vec, i);
412 Lisp_Object font_def = RFONT_DEF_FONT_DEF (rfont_def); 416 Lisp_Object font_def = RFONT_DEF_FONT_DEF (rfont_def);
413 Lisp_Object font_spec = FONT_DEF_SPEC (font_def); 417 Lisp_Object font_spec = FONT_DEF_SPEC (font_def);
414 int score = RFONT_DEF_SCORE (rfont_def) & 0xFF; 418 int score = RFONT_DEF_SCORE (rfont_def) & 0xFF;
415 419 Lisp_Object otf_spec = Ffont_get (font_spec, QCotf);
416 if (! font_match_p (font_spec, font_object)) 420
421 if (! NILP (otf_spec))
422 /* A font-spec with :otf is preferable regardless of encoding
423 and language.. */
424 ;
425 else if (! font_match_p (font_spec, font_object))
417 { 426 {
418 Lisp_Object encoding = FONT_DEF_ENCODING (font_def); 427 Lisp_Object encoding = FONT_DEF_ENCODING (font_def);
419 428
420 if (! NILP (encoding)) 429 if (! NILP (encoding))
421 { 430 {