wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

freefont.c (401B)


      1 /* Copyright ©2007-2010 Kris Maglione <maglione.k at Gmail>
      2  * See LICENSE file for license details.
      3  */
      4 #include "../x11.h"
      5 
      6 void
      7 freefont(Font *f) {
      8 	switch(f->type) {
      9 	case FFontSet:
     10 		XFreeFontSet(display, f->font.set);
     11 		break;
     12 	case FXft:
     13 		xft->fontclose(display, f->font.xft);
     14 		break;
     15 	case FX11:
     16 		XFreeFont(display, f->font.x11);
     17 		break;
     18 	default:
     19 		break;
     20 	}
     21 	free(f->name);
     22 	free(f);
     23 }