comparison src/objects-x.c @ 80:1ce6082ce73f r20-0b90

Import from CVS: tag r20-0b90
author cvs
date Mon, 13 Aug 2007 09:06:37 +0200
parents 131b0175ea99
children 4be1180a9e89
comparison
equal deleted inserted replaced
79:5b0a5bbffab6 80:1ce6082ce73f
285 FONT_INSTANCE_X_FONT (f) = xf; 285 FONT_INSTANCE_X_FONT (f) = xf;
286 f->ascent = xf->ascent; 286 f->ascent = xf->ascent;
287 f->descent = xf->descent; 287 f->descent = xf->descent;
288 f->height = xf->ascent + xf->descent; 288 f->height = xf->ascent + xf->descent;
289 { 289 {
290 unsigned int def_char = xf->default_char; 290 /* following change suggested by Ted Phelps <phelps@dstc.edu.au> */
291 unsigned int def_char = 'n'; /*xf->default_char;*/
291 int byte1, byte2; 292 int byte1, byte2;
292 293
293 once_more: 294 once_more:
294 byte1 = def_char >> 8; 295 byte1 = def_char >> 8;
295 byte2 = def_char & 0xFF; 296 byte2 = def_char & 0xFF;
313 /* Some fonts have a default char whose width is 0. This is no good. 314 /* Some fonts have a default char whose width is 0. This is no good.
314 If that's the case, first try 'n' as the default char, and if n has 315 If that's the case, first try 'n' as the default char, and if n has
315 0 width too (unlikely) then just use the max width. */ 316 0 width too (unlikely) then just use the max width. */
316 if (f->width == 0) 317 if (f->width == 0)
317 { 318 {
318 if (def_char == 'n') 319 if (def_char == xf->default_char)
319 f->width = xf->max_bounds.width; 320 f->width = xf->max_bounds.width;
320 else 321 else
321 { 322 {
322 def_char = 'n'; 323 def_char = xf->default_char;
323 goto once_more; 324 goto once_more;
324 } 325 }
325 } 326 }
326 } 327 }
327 /* If all characters don't exist then there could potentially be 328 /* If all characters don't exist then there could potentially be