1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-09-29 21:49:07 +00:00

fixed font bug

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@662 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Brenden Matthews 2006-05-28 04:25:34 +00:00
parent 2b40f6bc41
commit f9fa7f1d1c
2 changed files with 10 additions and 13 deletions

View File

@ -1,5 +1,8 @@
# $Id$ # $Id$
2006-05-27
* Fixed a bug with $font
2006-05-24 2006-05-24
* Xdamage support for composite and pals * Xdamage support for composite and pals

View File

@ -561,10 +561,6 @@ static char *scan_font(const char *args)
if (args && sizeof(args) < 127) { if (args && sizeof(args) < 127) {
return strdup(args); return strdup(args);
} }
/* else {
ERR("font scan failed, lets hope it doesn't mess stuff up");
we'll assume this means to use the default font now, like $color
}*/
return NULL; return NULL;
} }
@ -576,7 +572,6 @@ static void new_font(char *buf, char * args) {
int tmp = selected_font; int tmp = selected_font;
selected_font = s->font_added = addfont(args); selected_font = s->font_added = addfont(args);
load_fonts(); load_fonts();
//set_font();
selected_font = tmp; selected_font = tmp;
} }
} else { } else {
@ -584,7 +579,6 @@ static void new_font(char *buf, char * args) {
int tmp = selected_font; int tmp = selected_font;
selected_font = s->font_added = 0; selected_font = s->font_added = 0;
load_fonts(); load_fonts();
//set_font();
selected_font = tmp; selected_font = tmp;
} }
} }
@ -4822,7 +4816,7 @@ static void text_size_updater(char *s)
h += specials[special_index].arg; h += specials[special_index].arg;
} }
else if (specials[special_index].type == FONT) { else if (specials[special_index].type == FONT) {
fontchange = specials[special_index].font_added; fontchange = 1;
selected_font = specials[special_index].font_added; selected_font = specials[special_index].font_added;
h = font_height(); h = font_height();
} }
@ -5356,15 +5350,15 @@ static void draw_line(char *s)
case FONT: case FONT:
if (fontchange) { if (fontchange) {
int old = font_ascent();
cur_y -= font_ascent(); cur_y -= font_ascent();
selected_font = specials[special_index].font_added; selected_font = specials[special_index].font_added;
cur_y += font_ascent(); if (cur_y + (font_ascent()) < old) {
#ifdef XFT cur_y = old;
if (!use_xft || use_xdbe) } else {
#endif cur_y += font_ascent();
{
set_font();
} }
set_font();
} }
break; break;
case FG: case FG: