diff options
| author | Jason Rumney | 2008-04-08 14:29:39 +0000 |
|---|---|---|
| committer | Jason Rumney | 2008-04-08 14:29:39 +0000 |
| commit | 56a70cca39b4a6bf336dcc97ff20f7481046024b (patch) | |
| tree | 85f117d8f08757fedddec88fdb77a122d725a6b4 /src | |
| parent | 3d3d1efc2ed34234bac016f472f9b31d812738e2 (diff) | |
| download | emacs-56a70cca39b4a6bf336dcc97ff20f7481046024b.tar.gz emacs-56a70cca39b4a6bf336dcc97ff20f7481046024b.zip | |
(struct w32_metric_cache): New struct.
(w32font_info): Use it.
(W32METRIC_NO_ATTEMPT, W32METRIC_SUCCESS, W32METRIC_FAIL)
(CACHE_BLOCKSIZE): New constants.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/w32font.h | 15 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 4f1f087d00d..30ea46bc470 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2008-04-08 Jason Rumney <jasonr@gnu.org> | 1 | 2008-04-08 Jason Rumney <jasonr@gnu.org> |
| 2 | 2 | ||
| 3 | * w32font.h (struct w32_metric_cache): New struct. | ||
| 4 | (w32font_info): Use it. | ||
| 5 | (W32METRIC_NO_ATTEMPT, W32METRIC_SUCCESS, W32METRIC_FAIL) | ||
| 6 | (CACHE_BLOCKSIZE): New constants. | ||
| 7 | |||
| 3 | * w32font.c (Qja, Qko, Qzh): New symbols. | 8 | * w32font.c (Qja, Qko, Qzh): New symbols. |
| 4 | (syms_of_w32font): Initialise them. | 9 | (syms_of_w32font): Initialise them. |
| 5 | (font_matches_spec): Use them to filter by language. | 10 | (font_matches_spec): Use them to filter by language. |
diff --git a/src/w32font.h b/src/w32font.h index 9bd7546e057..6345d59c71f 100644 --- a/src/w32font.h +++ b/src/w32font.h | |||
| @@ -36,6 +36,16 @@ Boston, MA 02110-1301, USA. */ | |||
| 36 | 36 | ||
| 37 | #define NTMFLAGS_OPENTYPE (NTM_PS_OPENTYPE | NTM_TT_OPENTYPE) | 37 | #define NTMFLAGS_OPENTYPE (NTM_PS_OPENTYPE | NTM_TT_OPENTYPE) |
| 38 | 38 | ||
| 39 | struct w32_metric_cache | ||
| 40 | { | ||
| 41 | short lbearing, rbearing, width; | ||
| 42 | unsigned char status; | ||
| 43 | }; | ||
| 44 | |||
| 45 | #define W32METRIC_NO_ATTEMPT 0 | ||
| 46 | #define W32METRIC_SUCCESS 1 | ||
| 47 | #define W32METRIC_FAIL 2 | ||
| 48 | |||
| 39 | /* The actual structure for a w32 font, that can be cast to struct font. | 49 | /* The actual structure for a w32 font, that can be cast to struct font. |
| 40 | The Uniscribe backend extends this. */ | 50 | The Uniscribe backend extends this. */ |
| 41 | struct w32font_info | 51 | struct w32font_info |
| @@ -43,9 +53,12 @@ struct w32font_info | |||
| 43 | struct font font; | 53 | struct font font; |
| 44 | TEXTMETRIC metrics; | 54 | TEXTMETRIC metrics; |
| 45 | unsigned int glyph_idx; | 55 | unsigned int glyph_idx; |
| 46 | struct font_metrics ascii_metrics[128]; | 56 | struct w32_metric_cache **cached_metrics; |
| 57 | int n_cache_blocks; | ||
| 47 | }; | 58 | }; |
| 48 | 59 | ||
| 60 | #define CACHE_BLOCKSIZE 128 | ||
| 61 | |||
| 49 | Lisp_Object w32font_get_cache P_ ((FRAME_PTR fe)); | 62 | Lisp_Object w32font_get_cache P_ ((FRAME_PTR fe)); |
| 50 | Lisp_Object w32font_list_internal P_ ((Lisp_Object frame, | 63 | Lisp_Object w32font_list_internal P_ ((Lisp_Object frame, |
| 51 | Lisp_Object font_spec, | 64 | Lisp_Object font_spec, |