--- rxvt-unicode/src/rxvtfont.h 2007/10/18 09:11:43 1.24 +++ rxvt-unicode/src/rxvtfont.h 2010/03/30 23:54:30 1.30 @@ -15,7 +15,8 @@ struct rxvt_term; -struct rxvt_fontprop { +struct rxvt_fontprop +{ enum { unset = -1, medium = 100, bold = 200, @@ -25,7 +26,8 @@ int weight, slant; }; -struct rxvt_font { +struct rxvt_font +{ // managed by the fontset rxvt_term *term; void set_term (rxvt_term *term) { this->term = term; } @@ -38,7 +40,7 @@ int ascent, descent, width, height; - void set_name (char *name); + void set_name (char *name_); rxvt_font (); virtual ~rxvt_font () { free (name); }; @@ -62,9 +64,12 @@ struct rxvt_fallback_font; -struct rxvt_fontset { +struct rxvt_fontset +{ char *fontdesc; + enum { fontCount = 127 }; // must be power-of-two - 1, also has to match RS_fontMask in rxvt.h + rxvt_fontset (rxvt_term *term); ~rxvt_fontset (); @@ -77,7 +82,7 @@ // font-id's MUST fit into a signed 16 bit integer, and within 0..255 rxvt_font *operator [] (int id) const { - return fonts[id & 0x7f]; + return fonts[id & fontCount]; } private: