diff --git a/demo/x11_rawfb/main.c b/demo/x11_rawfb/main.c index c70b024..1311ca7 100644 --- a/demo/x11_rawfb/main.c +++ b/demo/x11_rawfb/main.c @@ -228,13 +228,13 @@ main(void) /* -------------- EXAMPLES ---------------- */ #ifdef INCLUDE_CALCULATOR - calculator(ctx); + calculator(&rawfb->ctx); #endif #ifdef INCLUDE_OVERVIEW - overview(ctx); + overview(&rawfb->ctx); #endif #ifdef INCLUDE_NODE_EDITOR - node_editor(ctx); + node_editor(&rawfb->ctx); #endif /* ----------------------------------------- */ diff --git a/demo/x11_xft/nuklear_xlib.h b/demo/x11_xft/nuklear_xlib.h index 0473502..ab2b2f5 100644 --- a/demo/x11_xft/nuklear_xlib.h +++ b/demo/x11_xft/nuklear_xlib.h @@ -430,7 +430,7 @@ nk_xsurf_draw_text(XSurface *surf, short x, short y, unsigned short w, unsigned xrc.blue = cfg.b * 257; xrc.alpha = cfg.a * 257; XftColorAllocValue(surf->dpy, xlib.vis, xlib.cmap, &xrc, &color); - XftDrawString8(surf->ftdraw, &color, font->ft, tx, ty, (FcChar8*)text, len); + XftDrawStringUtf8(surf->ftdraw, &color, font->ft, tx, ty, (FcChar8*)text, len); } #else XSetForeground(surf->dpy, surf->gc, fg); @@ -632,7 +632,7 @@ nk_xfont_get_text_width(nk_handle handle, float height, const char *text, int le XGlyphInfo g; if(!font || !text) return 0; - XftTextExtents8(xlib.dpy, font->ft, (FcChar8*)text, len, &g); + XftTextExtentsUtf8(xlib.dpy, font->ft, (FcChar8*)text, len, &g); return g.width; #else XRectangle r;