hey!
is there a good howto with examples on using xft antialiased and colored
fonts in xlib with c?
i have
http://keithp.com/~keithp/render/Xft.tutorial, but some examples
would be nice too ...
the following gives me black font:
#include <X11/Xlib.h>
#include <X11/Xft/Xft.h>
[...]
struct {
GC blue;
GC gray;
} gc; /* grafical contexts */
XftFont *xftfont;
XftDraw *draw;
XftColor color;
char *msg = "789,34 £ |@~½¾²³";
[...]
xftfont = XftFontOpen(dpy, scr,
XFT_FAMILY, XftTypeString, "dejavuserifcondensed",
XFT_SIZE, XftTypeDouble, 98.0,
NULL);
/* Set the color to black */
color.color.red = 0;
color.color.green = 0;
color.color.blue = 0;
color.color.alpha = 0xffff; //USHRT_MAX;
draw = XftDrawCreate(dpy, win, DefaultVisual(dpy, scr), cmap);
but how do i get i.e. something like
XAllocNamedColor(dpy, cmap, "#4c7899", &blue, &blue)
for the xft fonts?
thank you in advance
y0shi
--
psyc://nemesis.psyc.biz/~y0shi
http://psyc.biz/y0shi_public.ke