summaryrefslogtreecommitdiff
path: root/riscos/gui.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2002-09-26 21:38:33 +0000
committerJames Bursa <james@netsurf-browser.org>2002-09-26 21:38:33 +0000
commitfcbe2cebae28ef623dceb82ce9501027fea91fb5 (patch)
tree98c31a34081cc490422bdf6705d94c924a99b724 /riscos/gui.c
parentf0fc6ca473ee9532c7a4ce9493ee304de1c6d474 (diff)
downloadnetsurf-fcbe2cebae28ef623dceb82ce9501027fea91fb5.tar.gz
netsurf-fcbe2cebae28ef623dceb82ce9501027fea91fb5.tar.bz2
[project @ 2002-09-26 21:38:32 by bursa]
New Unicode font handling and rendering code. svn path=/import/netsurf/; revision=39
Diffstat (limited to 'riscos/gui.c')
-rw-r--r--riscos/gui.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/riscos/gui.c b/riscos/gui.c
index 15d38b540..b66a3b4a8 100644
--- a/riscos/gui.c
+++ b/riscos/gui.c
@@ -1,5 +1,5 @@
/**
- * $Id: gui.c,v 1.1 2002/09/11 14:24:02 monkeyson Exp $
+ * $Id: gui.c,v 1.2 2002/09/26 21:38:33 bursa Exp $
*/
#include "netsurf/riscos/font.h"
@@ -264,7 +264,7 @@ void ro_gui_window_redraw_box(gui_window* g, struct box * box, signed long x, si
struct box * c;
const char * const noname = "";
const char * name = noname;
- font_f font;
+ char *text;
switch (box->type)
{
@@ -299,8 +299,6 @@ void ro_gui_window_redraw_box(gui_window* g, struct box * box, signed long x, si
if (box->type == BOX_INLINE)
{
- font = riscos_font_css_to_handle(box->style);
-
if (g->data.browser.bw->current_content->data.html.text_selection.selected == 1)
{
struct box_position* start;
@@ -359,13 +357,13 @@ if (g->data.browser.bw->current_content->data.html.text_selection.selected == 1)
}
}
- font_paint(font, (char*) box->text,
- font_OS_UNITS | font_GIVEN_LENGTH | font_GIVEN_FONT | font_KERN,
+ text = font_utf8_to_string(box->font, box->text, box->length);
+ font_paint(box->font->handle[0], text,
+ font_OS_UNITS | font_GIVEN_FONT | font_KERN,
x + box->x * 2, y - box->y * 2 - box->height * 2,
NULL, NULL,
- box->length);
-
- font_lose_font(font);
+ 0);
+ free(text);
}
}