ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtfont.C
(Generate patch)

Comparing rxvt-unicode/src/rxvtfont.C (file contents):
Revision 1.75 by root, Sun Dec 18 00:59:42 2005 UTC vs.
Revision 1.76 by root, Tue Jan 3 23:40:58 2006 UTC

276 rxvt_fontprop properties () 276 rxvt_fontprop properties ()
277 { 277 {
278 rxvt_fontprop p; 278 rxvt_fontprop p;
279 279
280 p.width = p.height = 1; 280 p.width = p.height = 1;
281 p.ascent = rxvt_fontprop::unset;
281 p.weight = rxvt_fontprop::medium; 282 p.weight = rxvt_fontprop::medium;
282 p.slant = rxvt_fontprop::roman; 283 p.slant = rxvt_fontprop::roman;
283 284
284 return p; 285 return p;
285 } 286 }
523bool 524bool
524rxvt_font_x11::set_properties (rxvt_fontprop &p, int height, const char *weight, const char *slant, int avgwidth) 525rxvt_font_x11::set_properties (rxvt_fontprop &p, int height, const char *weight, const char *slant, int avgwidth)
525{ 526{
526 p.width = avgwidth ? (avgwidth + 1) / 10 : (height + 1) / 2; 527 p.width = avgwidth ? (avgwidth + 1) / 10 : (height + 1) / 2;
527 p.height = height; 528 p.height = height;
529 p.ascent = rxvt_fontprop::unset;
528 p.weight = *weight == 'B' || *weight == 'b' ? rxvt_fontprop::bold : rxvt_fontprop::medium; 530 p.weight = *weight == 'B' || *weight == 'b' ? rxvt_fontprop::bold : rxvt_fontprop::medium;
529 p.slant = *slant == 'r' || *slant == 'R' ? rxvt_fontprop::roman : rxvt_fontprop::italic; 531 p.slant = *slant == 'r' || *slant == 'R' ? rxvt_fontprop::roman : rxvt_fontprop::italic;
530 532
531 return true; 533 return true;
532} 534}
552 554
553 set_properties (p, height, weight, slant, avgwidth); 555 set_properties (p, height, weight, slant, avgwidth);
554 556
555 free (weight); 557 free (weight);
556 free (slant); 558 free (slant);
559
560 p.ascent = f->ascent;
557 561
558 return true; 562 return true;
559} 563}
560 564
561bool 565bool
1073 1077
1074 FT_Face face = XftLockFace (f); 1078 FT_Face face = XftLockFace (f);
1075 1079
1076 p.width = width; 1080 p.width = width;
1077 p.height = height; 1081 p.height = height;
1082 p.ascent = ascent;
1078 p.weight = face->style_flags & FT_STYLE_FLAG_BOLD 1083 p.weight = face->style_flags & FT_STYLE_FLAG_BOLD
1079 ? rxvt_fontprop::bold : rxvt_fontprop::medium; 1084 ? rxvt_fontprop::bold : rxvt_fontprop::medium;
1080 p.slant = face->style_flags & FT_STYLE_FLAG_ITALIC 1085 p.slant = face->style_flags & FT_STYLE_FLAG_ITALIC
1081 ? rxvt_fontprop::italic : rxvt_fontprop::roman; 1086 ? rxvt_fontprop::italic : rxvt_fontprop::roman;
1082 1087
1336} 1341}
1337 1342
1338void 1343void
1339rxvt_fontset::clear () 1344rxvt_fontset::clear ()
1340{ 1345{
1341 prop.width = prop.height = prop.weight = prop.slant 1346 prop.width = prop.height = prop.ascent = prop.weight = prop.slant
1342 = rxvt_fontprop::unset; 1347 = rxvt_fontprop::unset;
1343 1348
1344 for (rxvt_font **i = fonts.begin (); i != fonts.end (); i++) 1349 for (rxvt_font **i = fonts.begin (); i != fonts.end (); i++)
1345 FONT_UNREF (*i); 1350 FONT_UNREF (*i);
1346 1351
1519 if (FROM_UNICODE (f->cs, unicode) == NOCHAR) 1524 if (FROM_UNICODE (f->cs, unicode) == NOCHAR)
1520 goto next_font; 1525 goto next_font;
1521 1526
1522 if (!realize_font (i)) 1527 if (!realize_font (i))
1523 goto next_font; 1528 goto next_font;
1529
1530 if (prop.ascent != rxvt_fontprop::unset)
1531 max_it (f->ascent, prop.ascent);
1524 } 1532 }
1525 1533
1526 if (f->cs == CS_UNKNOWN) 1534 if (f->cs == CS_UNKNOWN)
1527 goto next_font; 1535 goto next_font;
1528 1536

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines