st slow startup
Johannes Hofmann <Johannes.Hofmann <at> gmx.de>
2013-05-09 21:42:50 GMT
Hi,
as others also have noticed, Xft based st starts slow on some
systems. For me it helps if FcFontSort() is done lazily as shown
below.
Regards,
Johannes
diff --git a/st.c b/st.c
index 50090a4..425f669 100644
--- a/st.c
+++ b/st.c
<at> <at> -2643,10 +2643,7 <at> <at> xloadfont(Font *f, FcPattern *pattern) {
if(!match)
return 1;
- if(!(f->set = FcFontSort(0, match, FcTrue, 0, &result))) {
- FcPatternDestroy(match);
- return 1;
- }
+ f->set = NULL;
if(!(f->match = XftFontOpenPattern(xw.dpy, match))) {
FcPatternDestroy(match);
<at> <at> -2666,6 +2663,16 <at> <at> xloadfont(Font *f, FcPattern *pattern) {
return 0;
}
+int
(Continue reading)