some minor changes allowing pango and xft to work together
This commit is contained in:
parent
21d75d806e
commit
a988dc7108
|
@ -163,7 +163,11 @@ readargs(int argc, char *argv[])
|
|||
else if (!strcmp(argv[i], "-p")) /* adds prompt to left of input field */
|
||||
prompt = argv[++i];
|
||||
else if (!strcmp(argv[i], "-fn")) /* font or font set */
|
||||
strcpy(font, argv[++i]); /* font[0] = argv[++i]; */
|
||||
#if USEPANGO
|
||||
strcpy(font, argv[++i]);
|
||||
#else
|
||||
strcpy(font[0], argv[++i]);
|
||||
#endif
|
||||
else if (!strcmp(argv[i], "-nmt")) /* normal mode text */
|
||||
strcpy(normtext, argv[++i]);
|
||||
else if (!strcmp(argv[i], "-imt")) { /* insert mode text */
|
||||
|
|
|
@ -96,14 +96,14 @@ xfont_free(Fnt *font)
|
|||
}
|
||||
|
||||
Fnt*
|
||||
drw_font_create(Drw* drw, const char font[], size_t fontcount)
|
||||
drw_font_create(Drw* drw, const char *font[], size_t fontcount)
|
||||
{
|
||||
Fnt *fnt = NULL;
|
||||
|
||||
if (!drw || !font)
|
||||
return NULL;
|
||||
|
||||
fnt = xfont_create(drw, font);
|
||||
fnt = xfont_create(drw, *font);
|
||||
|
||||
return (drw->font = fnt);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ void drw_resize(Drw *drw, unsigned int w, unsigned int h);
|
|||
void drw_free(Drw *drw);
|
||||
|
||||
/* Fnt abstraction */
|
||||
Fnt *drw_font_create(Drw* drw, const char font[], size_t fontcount);
|
||||
Fnt *drw_font_create(Drw* drw, const char *font[], size_t fontcount);
|
||||
void drw_font_free(Fnt* set);
|
||||
unsigned int drw_font_getwidth(Drw *drw, const char *text, Bool markup);
|
||||
void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h, Bool markup);
|
||||
|
|
|
@ -34,7 +34,7 @@ static int borderwidth = 2; /* Width of the border */
|
|||
static int bordercentered = 1; /* Draw border only when centered */
|
||||
|
||||
/* Font options */
|
||||
static char font[] = "Noto Sans Mono 8"; /* Font to draw text and Pango markup with. */
|
||||
static char *font[] = "Noto Sans Mono 8"; /* Font to draw text and Pango markup with. */
|
||||
|
||||
/* Symbol options */
|
||||
static char *leftarrow = "<"; /* Left arrow, used to indicate you can move to the left */
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# See LICENSE file for copyright details.
|
||||
|
||||
# spmenu version
|
||||
VERSION = 0.2.1
|
||||
VERSION = 0.2.2
|
||||
|
||||
# includes and libs
|
||||
INCS = -I$(X11INC) -I$(FREETYPEINC) $(BDINC) `pkg-config --cflags xft $(PANGO_CONF) $(PANGO_XFT_CONF)`
|
||||
|
|
4
spmenu.c
4
spmenu.c
|
@ -5,10 +5,6 @@
|
|||
* If you're looking for functions used to draw images, see 'libs/img.c'
|
||||
* If you're looking for the .Xresources array, see 'libs/xresources.h'
|
||||
*
|
||||
* To disable certain features, pass one or more of the following to the compiler:
|
||||
*
|
||||
* NOXINERAMA, NORTL, NOIMAGE
|
||||
*
|
||||
* You don't need to edit spmenu.c if you aren't making big changes to the software.
|
||||
*
|
||||
* After making changes, run 'make clean install' to install and 'make' to attempt a compilation.
|
||||
|
|
Loading…
Reference in a new issue