… | |
… | |
1183 | if (width < g.width ) width = g.width; |
1183 | if (width < g.width ) width = g.width; |
1184 | if (height < g.height ) height = g.height; |
1184 | if (height < g.height ) height = g.height; |
1185 | if (glheight < g.height - g.y) glheight = g.height - g.y; |
1185 | if (glheight < g.height - g.y) glheight = g.height - g.y; |
1186 | } |
1186 | } |
1187 | |
1187 | |
|
|
1188 | if (!width) |
|
|
1189 | { |
|
|
1190 | rxvt_warn ("unable to calculate font width for '%s', ignoring.\n", name); |
|
|
1191 | |
|
|
1192 | XftFontClose (disp, f); |
|
|
1193 | f = 0; |
|
|
1194 | |
|
|
1195 | success = false; |
|
|
1196 | break; |
|
|
1197 | } |
|
|
1198 | |
1188 | if (prop.height == rxvt_fontprop::unset |
1199 | if (prop.height == rxvt_fontprop::unset |
1189 | || (height <= prop.height && glheight <= prop.height) |
1200 | || (height <= prop.height && glheight <= prop.height) |
1190 | || height <= 2 |
1201 | || height <= 2 |
1191 | || !scalable) |
1202 | || !scalable) |
1192 | break; |
1203 | break; |
… | |
… | |
1201 | ftheight -= height - prop.height; |
1212 | ftheight -= height - prop.height; |
1202 | } |
1213 | } |
1203 | else |
1214 | else |
1204 | ftheight = prop.height - 1; |
1215 | ftheight = prop.height - 1; |
1205 | |
1216 | |
1206 | XftFontClose (disp, f); |
1217 | XftFontClose (disp, f); |
1207 | FcPatternDel (match, FC_PIXEL_SIZE); |
1218 | FcPatternDel (match, FC_PIXEL_SIZE); |
1208 | FcPatternAddInteger (match, FC_PIXEL_SIZE, ftheight); |
1219 | FcPatternAddInteger (match, FC_PIXEL_SIZE, ftheight); |
1209 | } |
1220 | } |
1210 | |
1221 | |
1211 | FcPatternDestroy (match); |
1222 | FcPatternDestroy (match); |
1212 | |
1223 | |
1213 | #if 0 // do it per-character |
1224 | #if 0 // do it per-character |