]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/cmd/truetypefs.c
cwfs: fix listen filedescriptor leaks
[plan9front.git] / sys / src / cmd / truetypefs.c
index 3b267fe09ddd1607f8cc8a58c3a2dd63e36ab88d..ddafee5376f31bae6ccfb41125ccd4e5bc096fe6 100644 (file)
@@ -186,7 +186,10 @@ compilesub(TFont *f, TSubfont *s)
                *p++ = 0;
                *p++ = h;
                *p++ = gs[i]->xminpx;
-               *p++ = gs[i]->advanceWidthpx;
+               if(gs[i]->advanceWidthpx != 0)
+                       *p++ = gs[i]->advanceWidthpx;
+               else
+                       *p++ = gs[i]->width;
                x += gs[i]->width;
        }
        *p++ = x;