diff options
| author | Kenichi Handa | 2008-05-22 05:21:06 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2008-05-22 05:21:06 +0000 |
| commit | 64b900e33e80ac10e247d2ef03b746c10e5d8ff4 (patch) | |
| tree | defd47a7fb42c61dac0763faf411f1eb43256bf6 | |
| parent | a368801ce640e7e00c6e8dcf3c71a75c270268f4 (diff) | |
| download | emacs-64b900e33e80ac10e247d2ef03b746c10e5d8ff4.tar.gz emacs-64b900e33e80ac10e247d2ef03b746c10e5d8ff4.zip | |
(font_prop_validate_style): Adjusted for the format
change of font_style_table.
| -rw-r--r-- | src/ChangeLog | 15 | ||||
| -rw-r--r-- | src/font.c | 9 |
2 files changed, 15 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 77e7dc86bdb..f9ed2746df3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2008-05-22 Kenichi Handa <handa@m17n.org> | 1 | 2008-05-22 Kenichi Handa <handa@m17n.org> |
| 2 | 2 | ||
| 3 | * font.c (font_prop_validate_style): Adjusted for the format | ||
| 4 | change of font_style_table. | ||
| 5 | |||
| 3 | * w32font.c (w32font_open_internal): Call Ffont_xlfd_name with | 6 | * w32font.c (w32font_open_internal): Call Ffont_xlfd_name with |
| 4 | two args. | 7 | two args. |
| 5 | 8 | ||
| @@ -40,21 +43,21 @@ | |||
| 40 | 43 | ||
| 41 | * font.c: Checking of FONT_DEBUG is moved to font.h. All calls of | 44 | * font.c: Checking of FONT_DEBUG is moved to font.h. All calls of |
| 42 | xassert are changed to font_assert. Delete many unused variables. | 45 | xassert are changed to font_assert. Delete many unused variables. |
| 43 | (Vfont_weight_table, Vfont_slant_table, Vfont_width_table): | 46 | (Vfont_weight_table, Vfont_slant_table, Vfont_width_table): New |
| 44 | New variables. | 47 | variables. |
| 45 | (struct table_entry): Move from xfaces.c and modified. | 48 | (struct table_entry): Move from xfaces.c and modified. |
| 46 | (weight_table, slant_table, width_table): Move from xfaces.c and | 49 | (weight_table, slant_table, width_table): Move from xfaces.c and |
| 47 | contents adjusted for the change of struct table_entry. | 50 | contents adjusted for the change of struct table_entry. |
| 48 | (font_style_to_value, font_style_symbolic): Adjut for the format | 51 | (font_style_to_value, font_style_symbolic): Adjusted for the |
| 49 | change of font_style_table. | 52 | format change of font_style_table. |
| 50 | (font_parse_family_registry): Don't overwrite existing foundry and | 53 | (font_parse_family_registry): Don't overwrite existing foundry and |
| 51 | family of font_spec. | 54 | family of font_spec. |
| 52 | (font_score): Fix calculation of diff for sizes. | 55 | (font_score): Fix calculation of diff for sizes. |
| 53 | (font_sort_entites): Call font_add_log. | 56 | (font_sort_entites): Call font_add_log. |
| 54 | (font_delete_unmatched): Return a newly created list. | 57 | (font_delete_unmatched): Return a newly created list. |
| 55 | (font_list_entities): Fix previous change. Call font_add_log. | 58 | (font_list_entities): Fix previous change. Call font_add_log. |
| 56 | (font_matching_entity, font_open_entity, font_close_entity): | 59 | (font_matching_entity, font_open_entity, font_close_entity): Call |
| 57 | Call font_add_log. | 60 | font_add_log. |
| 58 | (Ffont_xlfd_name): New arg FOLD-WILDCARDS. | 61 | (Ffont_xlfd_name): New arg FOLD-WILDCARDS. |
| 59 | (Finternal_set_font_style_table): Delete. | 62 | (Finternal_set_font_style_table): Delete. |
| 60 | (BUILD_STYLE_TABLE): New macro. | 63 | (BUILD_STYLE_TABLE): New macro. |
diff --git a/src/font.c b/src/font.c index 44c5aef9b90..84f2a2ac867 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -500,13 +500,16 @@ font_prop_validate_style (style, val) | |||
| 500 | if (INTEGERP (val)) | 500 | if (INTEGERP (val)) |
| 501 | { | 501 | { |
| 502 | n = XINT (val); | 502 | n = XINT (val); |
| 503 | if ((n & 0xFF) | 503 | if (((n >> 4) & 0xF) |
| 504 | >= ASIZE (AREF (font_style_table, prop - FONT_WEIGHT_INDEX))) | 504 | >= ASIZE (AREF (font_style_table, prop - FONT_WEIGHT_INDEX))) |
| 505 | val = Qerror; | 505 | val = Qerror; |
| 506 | else | 506 | else |
| 507 | { | 507 | { |
| 508 | Lisp_Object elt = AREF (AREF (font_style_table, prop - FONT_WEIGHT_INDEX), n & 0xFF); | 508 | Lisp_Object elt = AREF (AREF (font_style_table, prop - FONT_WEIGHT_INDEX), (n >> 4) & 0xF); |
| 509 | if (XINT (XCDR (elt)) != (n >> 8)) | 509 | |
| 510 | if ((n & 0xF) + 1 >= ASIZE (elt)) | ||
| 511 | val = Qerror; | ||
| 512 | else if (XINT (AREF (elt, 0)) != (n >> 8)) | ||
| 510 | val = Qerror; | 513 | val = Qerror; |
| 511 | } | 514 | } |
| 512 | } | 515 | } |