… | |
… | |
66 | |
66 | |
67 | struct rxvt_fontset |
67 | struct rxvt_fontset |
68 | { |
68 | { |
69 | char *fontdesc; |
69 | char *fontdesc; |
70 | |
70 | |
71 | enum { fontCount = 127 }; // must be power-of-two - 1, also has to match RS_fontMask in rxvt.h |
71 | enum { fontCount = 7 }; // must be power-of-two - 1, also has to match RS_fontMask in rxvt.h |
72 | enum { Careful = fontCount + 1 }; |
72 | enum { firstFont = 2 }; // index of first font in set |
73 | |
73 | |
74 | rxvt_fontset (rxvt_term *term); |
74 | rxvt_fontset (rxvt_term *term); |
75 | ~rxvt_fontset (); |
75 | ~rxvt_fontset (); |
76 | |
76 | |
77 | bool populate (const char *desc); |
77 | bool populate (const char *desc); |
… | |
… | |
82 | bool realize_font (int i); |
82 | bool realize_font (int i); |
83 | |
83 | |
84 | // font-id's MUST fit into a signed 16 bit integer, and within 0..255 |
84 | // font-id's MUST fit into a signed 16 bit integer, and within 0..255 |
85 | rxvt_font *operator [] (int id) const |
85 | rxvt_font *operator [] (int id) const |
86 | { |
86 | { |
87 | return fonts[id & fontCount]; |
87 | return fonts[id >> 1]; |
88 | } |
88 | } |
89 | |
89 | |
90 | private: |
90 | private: |
91 | rxvt_term *term; |
91 | rxvt_term *term; |
92 | rxvt_fontprop prop; |
92 | rxvt_fontprop prop; |