Mercurial > emacs
comparison src/w32term.c @ 32727:3ecb42f00b85
(w32_cache_char_metrics): Double check that font is
really fixed pitch before trusting tmPitchAndFamily.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Sat, 21 Oct 2000 17:14:43 +0000 |
parents | 8530cd0a7455 |
children | f2ad0856e45c |
comparison
equal
deleted
inserted
replaced
32726:7235706eca00 | 32727:3ecb42f00b85 |
---|---|
1282 /* TODO: determine whether font is fixed-pitch. */ | 1282 /* TODO: determine whether font is fixed-pitch. */ |
1283 w32_bdf_per_char_metric (font, &char2b, 1, &font->max_bounds); | 1283 w32_bdf_per_char_metric (font, &char2b, 1, &font->max_bounds); |
1284 } | 1284 } |
1285 else | 1285 else |
1286 { | 1286 { |
1287 if ((font->tm.tmPitchAndFamily & TMPF_FIXED_PITCH) != 0) | 1287 if (((font->tm.tmPitchAndFamily & TMPF_FIXED_PITCH) != 0) |
1288 /* Some fonts (eg DBCS fonts) are marked as fixed width even | |
1289 though they contain characters of different widths. */ | |
1290 || (font->tm.tmMaxCharWidth != font->tm.tmAveCharWidth)) | |
1288 { | 1291 { |
1289 /* Font is not fixed pitch, so cache per_char info for the | 1292 /* Font is not fixed pitch, so cache per_char info for the |
1290 ASCII characters. It would be much more work, and probably | 1293 ASCII characters. It would be much more work, and probably |
1291 not worth it, to cache other chars, since we may change | 1294 not worth it, to cache other chars, since we may change |
1292 between using Unicode and ANSI text drawing functions at | 1295 between using Unicode and ANSI text drawing functions at |