- b->bg = xloadcolors(dpy, cmap, bg);
- b->fg = xloadcolors(dpy, cmap, fg);
- b->border = xloadcolors(dpy, cmap, border);
-}
-
-unsigned int
-textnw(Fnt *font, char *text, unsigned int len)
-{
- XRectangle r;
- if(font->set) {
- XmbTextExtents(font->set, text, len, NULL, &r);
- return r.width;
- }
- return XTextWidth(font->xfont, text, len);
-}
-
-unsigned int
-textw(Fnt *font, char *text)
-{
- return textnw(font, text, strlen(text));
-}