Mercurial > emacs
comparison src/w32term.c @ 43146:49ffe8f5efb6
(w32_native_per_char_metric): Disable 2002-01-20 change.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Wed, 06 Feb 2002 20:57:44 +0000 |
parents | b3ee5e92548a |
children | 44e2e2c9154f |
comparison
equal
deleted
inserted
replaced
43145:977693cfea39 | 43146:49ffe8f5efb6 |
---|---|
1218 else | 1218 else |
1219 retval = GetCharABCWidthsA (hdc, *char2b, *char2b, &char_widths); | 1219 retval = GetCharABCWidthsA (hdc, *char2b, *char2b, &char_widths); |
1220 | 1220 |
1221 if (retval) | 1221 if (retval) |
1222 { | 1222 { |
1223 #if 0 | |
1224 /* Disabled until we can find a way to get the right results | |
1225 on all versions of Windows. */ | |
1226 | |
1223 /* Don't trust the ABC widths. For synthesized fonts they are | 1227 /* Don't trust the ABC widths. For synthesized fonts they are |
1224 wrong, and so is the result of GetCharWidth()! */ | 1228 wrong, and so is the result of GetCharWidth()! */ |
1225 int real_width; | 1229 int real_width; |
1226 GetCharWidth (hdc, *char2b, *char2b, &real_width); | 1230 GetCharWidth (hdc, *char2b, *char2b, &real_width); |
1227 | 1231 #endif |
1228 pcm->width = char_widths.abcA + char_widths.abcB + char_widths.abcC; | 1232 pcm->width = char_widths.abcA + char_widths.abcB + char_widths.abcC; |
1229 | 1233 #if 0 |
1230 /* As far as I can tell, this is the best way to determine what | 1234 /* As far as I can tell, this is the best way to determine what |
1231 ExtTextOut will do with the broken font. */ | 1235 ExtTextOut will do with the broken font. */ |
1232 if (pcm->width != real_width) | 1236 if (pcm->width != real_width) |
1233 pcm->width = (pcm->width + real_width) / 2; | 1237 pcm->width = (pcm->width + real_width) / 2; |
1234 | 1238 #endif |
1235 pcm->lbearing = char_widths.abcA; | 1239 pcm->lbearing = char_widths.abcA; |
1236 pcm->rbearing = char_widths.abcA + char_widths.abcB; | 1240 pcm->rbearing = char_widths.abcA + char_widths.abcB; |
1237 pcm->ascent = FONT_BASE (font); | 1241 pcm->ascent = FONT_BASE (font); |
1238 pcm->descent = FONT_DESCENT (font); | 1242 pcm->descent = FONT_DESCENT (font); |
1239 } | 1243 } |