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.153 by sf-exg, Sat Jan 30 20:43:57 2010 UTC vs.
Revision 1.159 by sf-exg, Wed Mar 31 13:14:50 2010 UTC

499 499
500 void draw (rxvt_drawable &d, int x, int y, 500 void draw (rxvt_drawable &d, int x, int y,
501 const text_t *text, int len, 501 const text_t *text, int len,
502 int fg, int bg); 502 int fg, int bg);
503 503
504 bool slow; // wether this is a proportional font or has other funny characteristics 504 bool slow; // whether this is a proportional font or has other funny characteristics
505 XFontStruct *f; 505 XFontStruct *f;
506 bool enc2b, encm; 506 bool enc2b, encm;
507 507
508 char *get_property (XFontStruct *f, Atom property, const char *repl) const; 508 char *get_property (XFontStruct *f, Atom property, const char *repl) const;
509 bool set_properties (rxvt_fontprop &p, int height, const char *weight, const char *slant, int avgwidth); 509 bool set_properties (rxvt_fontprop &p, int height, const char *weight, const char *slant, int avgwidth);
915 uint32_t ch = FROM_UNICODE (cs, unicode); 915 uint32_t ch = FROM_UNICODE (cs, unicode);
916 916
917 if (ch == NOCHAR) 917 if (ch == NOCHAR)
918 return false; 918 return false;
919 919
920 /* check wether the character exists in _this_ font. horrible. */ 920 /* check whether the character exists in _this_ font. horrible. */
921 XCharStruct *xcs; 921 XCharStruct *xcs;
922 922
923 if (encm) 923 if (encm)
924 { 924 {
925 unsigned char byte1 = ch >> 8; 925 unsigned char byte1 = ch >> 8;
955 return false; 955 return false;
956 956
957 if (!prop || prop->width == rxvt_fontprop::unset) 957 if (!prop || prop->width == rxvt_fontprop::unset)
958 return true; 958 return true;
959 959
960 // check wether character overlaps previous/next character 960 // check whether character overlaps previous/next character
961 int w = xcs->rbearing - xcs->lbearing; 961 int w = xcs->rbearing - xcs->lbearing;
962 int wcw = max (WCWIDTH (unicode), 1); 962 int wcw = max (WCWIDTH (unicode), 1);
963 963
964 careful = xcs->lbearing < 0 || xcs->rbearing > prop->width * wcw; 964 careful = xcs->lbearing < 0 || xcs->rbearing > prop->width * wcw;
965 965
1675 FcPatternDestroy (match); 1675 FcPatternDestroy (match);
1676 1676
1677 if (find_font (font) < 0) 1677 if (find_font (font) < 0)
1678 { 1678 {
1679 char fontname[4096]; 1679 char fontname[4096];
1680 sprintf (fontname, "xft:%-.4090s", font); 1680 snprintf (fontname, sizeof (fontname), "xft:%s", font);
1681 1681
1682 fonts.push_back (new_font (fontname, CS_UNICODE)); 1682 fonts.push_back (new_font (fontname, CS_UNICODE));
1683 } 1683 }
1684 1684
1685 free (font); 1685 free (font);
1709 } 1709 }
1710 1710
1711 return i; 1711 return i;
1712} 1712}
1713 1713
1714
1715

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines