From 95f0da676903ac1975beaa3567cb8c5ba28660e5 Mon Sep 17 00:00:00 2001 From: oga Date: Sun, 15 Jun 2008 02:47:46 +0000 Subject: Rip out and burn the HASH_* stuff. We don't need a SPLAY tree for one font. makes the code a lot simpler. While here rearrange the font handling functions to be less shit. ok and help okan@. --- conf.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'conf.c') diff --git a/conf.c b/conf.c index 90e8e0c..69b4226 100644 --- a/conf.c +++ b/conf.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: conf.c,v 1.39 2008/06/14 21:59:09 okan Exp $ + * $Id: conf.c,v 1.40 2008/06/15 02:47:46 oga Exp $ */ #include "headers.h" @@ -50,6 +50,15 @@ conf_cmd_add(struct conf *c, char *image, char *label, int flags) } } +void +conf_font(struct conf *c) +{ + struct screen_ctx *sc = screen_current(); + + c->DefaultFont = font_make(sc, Conf.DefaultFontName); + c->FontHeight = font_ascent() + font_descent() + 1; +} + int conf_changed(char *path) { @@ -78,7 +87,7 @@ conf_reload(struct conf *c) return; } - DefaultFont = font_getx(Curscreen, c->DefaultFontName); + conf_font(c); } void -- cgit v1.2.3-2-gb3c3