aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Rumney2008-07-28 21:37:31 +0000
committerJason Rumney2008-07-28 21:37:31 +0000
commit9cac63134b9c45a409ead84e7f351c2e6ba8501a (patch)
treea2ccadfc435d874d46726755c2ab96a74154aaf6 /src
parent639eebe2787b766e624de8dfa3935f63935f4340 (diff)
downloademacs-9cac63134b9c45a409ead84e7f351c2e6ba8501a.tar.gz
emacs-9cac63134b9c45a409ead84e7f351c2e6ba8501a.zip
(w32font_text_extents): Use w32_metric_cache consistently.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog2
-rw-r--r--src/w32font.c10
2 files changed, 7 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5400f89a3e3..f152056f5e6 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -6,6 +6,8 @@
6 6
72008-07-28 Jason Rumney <jasonr@gnu.org> 72008-07-28 Jason Rumney <jasonr@gnu.org>
8 8
9 * w32font.c (w32font_text_extents): Use w32_metric_cache consistently.
10
9 * w32term.c: (w32_enable_unicode_output, cleartype_active): Remove 11 * w32term.c: (w32_enable_unicode_output, cleartype_active): Remove
10 obsolete display options. 12 obsolete display options.
11 (x_draw_glyph_string_background): Don't use old cleartype_active 13 (x_draw_glyph_string_background): Don't use old cleartype_active
diff --git a/src/w32font.c b/src/w32font.c
index 9fdda5d7a5e..ef8410915f2 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -432,24 +432,24 @@ w32font_text_extents (font, code, nglyphs, metrics)
432 if (!w32_font->cached_metrics) 432 if (!w32_font->cached_metrics)
433 w32_font->cached_metrics 433 w32_font->cached_metrics
434 = xmalloc ((block + 1) 434 = xmalloc ((block + 1)
435 * sizeof (struct w32_cached_metric *)); 435 * sizeof (struct w32_metric_cache *));
436 else 436 else
437 w32_font->cached_metrics 437 w32_font->cached_metrics
438 = xrealloc (w32_font->cached_metrics, 438 = xrealloc (w32_font->cached_metrics,
439 (block + 1) 439 (block + 1)
440 * sizeof (struct w32_cached_metric *)); 440 * sizeof (struct w32_metric_cache *));
441 bzero (w32_font->cached_metrics + w32_font->n_cache_blocks, 441 bzero (w32_font->cached_metrics + w32_font->n_cache_blocks,
442 ((block + 1 - w32_font->n_cache_blocks) 442 ((block + 1 - w32_font->n_cache_blocks)
443 * sizeof (struct w32_cached_metric *))); 443 * sizeof (struct w32_metric_cache *)));
444 w32_font->n_cache_blocks = block + 1; 444 w32_font->n_cache_blocks = block + 1;
445 } 445 }
446 446
447 if (!w32_font->cached_metrics[block]) 447 if (!w32_font->cached_metrics[block])
448 { 448 {
449 w32_font->cached_metrics[block] 449 w32_font->cached_metrics[block]
450 = xmalloc (CACHE_BLOCKSIZE * sizeof (struct font_metrics)); 450 = xmalloc (CACHE_BLOCKSIZE * sizeof (struct w32_metric_cache));
451 bzero (w32_font->cached_metrics[block], 451 bzero (w32_font->cached_metrics[block],
452 CACHE_BLOCKSIZE * sizeof (struct font_metrics)); 452 CACHE_BLOCKSIZE * sizeof (struct w32_metric_cache));
453 } 453 }
454 454
455 char_metric = w32_font->cached_metrics[block] + pos_in_block; 455 char_metric = w32_font->cached_metrics[block] + pos_in_block;