1 /* Conky, a system monitor, based on torsmo
3 * Any original torsmo code is licensed under the BSD license
5 * All code written since the fork of torsmo is licensed under the GPL
7 * Please see COPYING for details
9 * Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
10 * Copyright (c) 2005-2009 Brenden Matthews, Philip Kovacs, et. al.
12 * All rights reserved.
14 * This program is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation, either version 3 of the License, or
17 * (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program. If not, see <http://www.gnu.org/licenses/>.
35 char name[DEFAULT_TEXT_BUFFER_SIZE];
47 #define font_height() (use_xft ? (fonts[selected_font].xftfont->ascent + \
48 fonts[selected_font].xftfont->descent) \
49 : (fonts[selected_font].font->max_bounds.ascent + \
50 fonts[selected_font].font->max_bounds.descent))
51 #define font_ascent() (use_xft ? fonts[selected_font].xftfont->ascent \
52 : fonts[selected_font].font->max_bounds.ascent)
53 #define font_descent() (use_xft ? fonts[selected_font].xftfont->descent \
54 : fonts[selected_font].font->max_bounds.descent)
58 #define font_height() (fonts[selected_font].font->max_bounds.ascent + \
59 fonts[selected_font].font->max_bounds.descent)
60 #define font_ascent() fonts[selected_font].font->max_bounds.ascent
61 #define font_descent() fonts[selected_font].font->max_bounds.descent
65 #define MAX_FONTS 64 // hmm, no particular reason, just makes sense.
67 /* direct access to registered fonts (FIXME: bad encapsulation) */
68 extern struct font_list *fonts;
69 extern int selected_font;
70 extern int font_count;
73 int addfont(const char *);
74 void set_first_font(const char *);
75 void free_fonts(void);
76 void load_fonts(void);