--- rxvt-unicode/src/rxvtfont.h 2008/11/05 14:43:54 1.25 +++ rxvt-unicode/src/rxvtfont.h 2010/03/31 22:22:32 1.33 @@ -34,13 +34,13 @@ char *name; codeset cs; - bool loaded; // wether we tried loading it before (not wether it's loaded) + bool loaded; // whether we tried loading it before (not whether it's loaded) // managed by the font object int ascent, descent, width, height; - void set_name (char *name); + void set_name (char *name_); rxvt_font (); virtual ~rxvt_font () { free (name); }; @@ -68,11 +68,15 @@ { char *fontdesc; + enum { fontCount = 7 }; // must be power-of-two - 1, also has to match RS_fontMask in rxvt.h + enum { firstFont = 2 }; // index of first font in set + rxvt_fontset (rxvt_term *term); ~rxvt_fontset (); bool populate (const char *desc); void set_prop (const rxvt_fontprop &prop, bool force_prop) { this->prop = prop; this->force_prop = force_prop; } + int find_font_idx (uint32_t unicode); int find_font (uint32_t unicode); int find_font (const char *name) const; bool realize_font (int i); @@ -80,7 +84,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 >> 1]; } private: