diff options
| author | Kenichi Handa | 2010-08-25 14:58:15 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2010-08-25 14:58:15 +0900 |
| commit | 9dfdbc0ad57f07e3d1fa810b62217a79d34fd54d (patch) | |
| tree | 92d142353849f287bd79cf1a78ba1b5eff2bf979 /src/fontset.c | |
| parent | f6aa6ec68ed936800ef2c3aefa42102e60b654cb (diff) | |
| download | emacs-9dfdbc0ad57f07e3d1fa810b62217a79d34fd54d.tar.gz emacs-9dfdbc0ad57f07e3d1fa810b62217a79d34fd54d.zip | |
fontset.c (reorder_font_vector): Prefer a font-spec specifying :otf.
Diffstat (limited to 'src/fontset.c')
| -rw-r--r-- | src/fontset.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/fontset.c b/src/fontset.c index b273ace75af..86b9ceb45db 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -283,6 +283,10 @@ fontset_id_valid_p (id) | |||
| 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)) |
| @@ -412,8 +416,13 @@ reorder_font_vector (Lisp_Object font_group, struct font *font) | |||
| 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; |
| 419 | Lisp_Object otf_spec = Ffont_get (font_spec, QCotf); | ||
| 415 | 420 | ||
| 416 | if (! font_match_p (font_spec, font_object)) | 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 | ||