From 0cecbe3cbcef566fb679aed5f0055397cb4c040c Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Fri, 20 Feb 2009 09:51:21 +0000 Subject: allow framebuffer port to use freetype2 library svn path=/trunk/netsurf/; revision=6570 --- framebuffer/fb_rootwindow.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'framebuffer/fb_rootwindow.c') diff --git a/framebuffer/fb_rootwindow.c b/framebuffer/fb_rootwindow.c index dd04ff726..05b3eaeaf 100644 --- a/framebuffer/fb_rootwindow.c +++ b/framebuffer/fb_rootwindow.c @@ -79,6 +79,8 @@ struct fb_widget { char* text; }; +static struct css_style root_style; + static struct fb_widget *widget_list; /* widget for status */ @@ -141,7 +143,7 @@ fb_redraw_widget(struct fb_widget *widget) if (widget->text != NULL) { plot.text(fb_plot_ctx.x0 + 2, fb_plot_ctx.y0 + 15, - NULL, + &root_style, widget->text, strlen(widget->text), widget->bg, @@ -383,6 +385,10 @@ void fb_rootwindow_create(framebuffer_t *fb) /* no widget yet has input */ inputfocus_widget = NULL; + /* setup root css style (for text etc.) */ + root_style.font_size.value.length.unit = CSS_UNIT_PX; + root_style.font_size.value.length.value = 14; + /* underlying root window, cannot take input and lowest in stack */ rootwindow = calloc(1, sizeof(struct gui_window)); rootwindow->x = 0; -- cgit v1.2.3