-loadcolors(Display *dpy, int screen, Brush *b,
- const char *bg, const char *fg, const char *border)
-{
- Colormap cmap = DefaultColormap(dpy, screen);
- 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));
-}
-
-unsigned int
-texth(Fnt *font)
-{
- return font->height + 4;
-}
-
-void
-loadfont(Display *dpy, Fnt *font, const char *fontstr)