… | |
… | |
216 | : name(0), width(rxvt_fontprop::unset), height(rxvt_fontprop::unset) |
216 | : name(0), width(rxvt_fontprop::unset), height(rxvt_fontprop::unset) |
217 | { |
217 | { |
218 | } |
218 | } |
219 | |
219 | |
220 | void |
220 | void |
221 | rxvt_font::set_name (char *name) |
221 | rxvt_font::set_name (char *name_) |
222 | { |
222 | { |
223 | if (this->name == name) |
223 | if (name == name_) |
224 | return; |
224 | return; |
225 | |
225 | |
226 | if (this->name) free (this->name); // let the compiler optimize |
226 | if (name) free (name); // let the compiler optimize |
227 | this->name = name; |
227 | name = name_; |
228 | } |
228 | } |
229 | |
229 | |
230 | void |
230 | void |
231 | rxvt_font::clear_rect (rxvt_drawable &d, int x, int y, int w, int h, int color) const |
231 | rxvt_font::clear_rect (rxvt_drawable &d, int x, int y, int w, int h, int color) const |
232 | { |
232 | { |
… | |
… | |
1133 | FcPatternAddInteger (p, FC_SLANT, prop.slant); |
1133 | FcPatternAddInteger (p, FC_SLANT, prop.slant); |
1134 | |
1134 | |
1135 | #if 0 // clipping unfortunately destroys our precious double-width-characters |
1135 | #if 0 // clipping unfortunately destroys our precious double-width-characters |
1136 | // clip width, we can't do better, or can we? |
1136 | // clip width, we can't do better, or can we? |
1137 | if (FcPatternGet (p, FC_CHAR_WIDTH, 0, &v) != FcResultMatch) |
1137 | if (FcPatternGet (p, FC_CHAR_WIDTH, 0, &v) != FcResultMatch) |
1138 | FcPatternAddInteger (p, FC_CHAR_WIDTH, prop->width); |
1138 | FcPatternAddInteger (p, FC_CHAR_WIDTH, prop.width); |
1139 | #endif |
1139 | #endif |
1140 | |
1140 | |
1141 | if (FcPatternGet (p, FC_MINSPACE, 0, &v) != FcResultMatch) |
1141 | if (FcPatternGet (p, FC_MINSPACE, 0, &v) != FcResultMatch) |
1142 | FcPatternAddBool (p, FC_MINSPACE, 1); |
1142 | FcPatternAddBool (p, FC_MINSPACE, 1); |
1143 | |
1143 | |
… | |
… | |
1297 | |
1297 | |
1298 | int w = term->fwidth * len; |
1298 | int w = term->fwidth * len; |
1299 | int h = term->fheight; |
1299 | int h = term->fheight; |
1300 | |
1300 | |
1301 | bool buffered = bg >= Color_transparent |
1301 | bool buffered = bg >= Color_transparent |
1302 | && term->option (Opt_buffered); |
1302 | && term->option (Opt_buffered); |
1303 | |
1303 | |
1304 | // cut trailing spaces |
1304 | // cut trailing spaces |
1305 | while (len && text [len - 1] == ' ') |
1305 | while (len && text [len - 1] == ' ') |
1306 | len--; |
1306 | len--; |
1307 | |
1307 | |