aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Rumney2000-12-02 14:38:57 +0000
committerJason Rumney2000-12-02 14:38:57 +0000
commit4b99045f51005264a6cc3948124c56e7f3338323 (patch)
tree35565323de3ae088ac0242252785e0e845419972 /src
parent5cbb3e93c884df5d881778935d80f79a3b912df7 (diff)
downloademacs-4b99045f51005264a6cc3948124c56e7f3338323.tar.gz
emacs-4b99045f51005264a6cc3948124c56e7f3338323.zip
(w32_bdf_per_char_metric): Dereference pointer correctly for single
byte character case. (w32_per_char_metric): Do not try to make any assumptions about the metrics of BDF fonts.
Diffstat (limited to 'src')
-rw-r--r--src/w32term.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/w32term.c b/src/w32term.c
index 3e9a731fdb2..4e80e88c10e 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -1143,7 +1143,7 @@ w32_bdf_per_char_metric (font, char2b, dim, pcm)
1143 char buf[2]; 1143 char buf[2];
1144 1144
1145 if (dim == 1) 1145 if (dim == 1)
1146 buf[0] = (char)char2b; 1146 buf[0] = (char)(*char2b);
1147 else 1147 else
1148 { 1148 {
1149 buf[0] = BYTE1 (*char2b); 1149 buf[0] = BYTE1 (*char2b);
@@ -1260,10 +1260,10 @@ w32_per_char_metric (font, char2b, font_type)
1260 xassert (font_type != UNKNOWN_FONT); 1260 xassert (font_type != UNKNOWN_FONT);
1261 1261
1262 /* Handle the common cases quickly. */ 1262 /* Handle the common cases quickly. */
1263 if (font->per_char == NULL) 1263 if (!font->bdf && font->per_char == NULL)
1264 /* TODO: determine whether char2b exists in font? */ 1264 /* TODO: determine whether char2b exists in font? */
1265 return &font->max_bounds; 1265 return &font->max_bounds;
1266 else if (*char2b < 128) 1266 else if (!font->bdf && *char2b < 128)
1267 return &font->per_char[*char2b]; 1267 return &font->per_char[*char2b];
1268 1268
1269 pcm = &font->scratch; 1269 pcm = &font->scratch;