JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
Increasing font cache for speeding up UTF8 demos.
[st.git] / st.c
diff --git a/st.c b/st.c
index cc8a22a..7ceed75 100644 (file)
--- a/st.c
+++ b/st.c
@@ -436,7 +436,7 @@ typedef struct {
  * the current length of used elements.
  */
 
-static Fontcache frc[256];
+static Fontcache frc[2048];
 static int frccur = -1, frclen = 0;
 
 ssize_t
@@ -2406,7 +2406,7 @@ xunloadfonts(void)
         * from the frccur.
         */
        for (i = 0, ip = frccur; i < frclen; i++, ip--) {
-               if (ip <= 0)
+               if (ip < 0)
                        ip = LEN(frc) - 1;
                XftFontClose(xw.dpy, frc[ip].font);
        }
@@ -2542,7 +2542,6 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
        FcPattern *fcpattern, *fontpattern;
        FcFontSet *fcsets[] = { NULL };
        FcCharSet *fccharset;
-       XGlyphInfo extents;
        Colour *fg = &dc.col[base.fg], *bg = &dc.col[base.bg],
                 *temp, revfg, revbg;
        XRenderColor colfg, colbg;