… | |
… | |
998 | #endif |
998 | #endif |
999 | |
999 | |
1000 | ///////////////////////////////////////////////////////////////////////////// |
1000 | ///////////////////////////////////////////////////////////////////////////// |
1001 | |
1001 | |
1002 | rxvt_fontset::rxvt_fontset (rxvt_t r) |
1002 | rxvt_fontset::rxvt_fontset (rxvt_t r) |
1003 | : r (r) |
1003 | : r (r), fontdesc (0) |
1004 | { |
1004 | { |
1005 | clear (); |
1005 | clear (); |
1006 | } |
1006 | } |
1007 | |
1007 | |
1008 | rxvt_fontset::~rxvt_fontset () |
1008 | rxvt_fontset::~rxvt_fontset () |
… | |
… | |
1013 | void |
1013 | void |
1014 | rxvt_fontset::clear () |
1014 | rxvt_fontset::clear () |
1015 | { |
1015 | { |
1016 | for (rxvt_font **i = fonts.begin (); i != fonts.end (); i++) |
1016 | for (rxvt_font **i = fonts.begin (); i != fonts.end (); i++) |
1017 | FONT_UNREF (*i); |
1017 | FONT_UNREF (*i); |
|
|
1018 | |
|
|
1019 | free (fontdesc); fontdesc = 0; |
1018 | |
1020 | |
1019 | fonts.clear (); |
1021 | fonts.clear (); |
1020 | base_id = 0; |
1022 | base_id = 0; |
1021 | base_prop.height = 0x7fffffff; |
1023 | base_prop.height = 0x7fffffff; |
1022 | base_prop.weight = rxvt_fontprop::medium; |
1024 | base_prop.weight = rxvt_fontprop::medium; |
… | |
… | |
1130 | bool |
1132 | bool |
1131 | rxvt_fontset::populate (const char *desc) |
1133 | rxvt_fontset::populate (const char *desc) |
1132 | { |
1134 | { |
1133 | clear (); |
1135 | clear (); |
1134 | |
1136 | |
|
|
1137 | fontdesc = strdup (desc); |
|
|
1138 | |
1135 | fonts.push_back (new_font (0, CS_UNICODE)); |
1139 | fonts.push_back (new_font (0, CS_UNICODE)); |
1136 | realize_font (0); |
1140 | realize_font (0); |
1137 | |
1141 | |
1138 | add_fonts (desc); |
1142 | add_fonts (desc); |
1139 | |
1143 | |