From ae4cb4c56dd865654a718c80693d8ac046126ace Mon Sep 17 00:00:00 2001 From: James Bursa Date: Wed, 28 Jan 2004 23:08:28 +0000 Subject: [project @ 2004-01-28 23:08:28 by bursa] Improve font-family. svn path=/import/netsurf/; revision=515 --- riscos/font.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'riscos/font.c') diff --git a/riscos/font.c b/riscos/font.c index 37fc8f7f2..9833871c3 100644 --- a/riscos/font.c +++ b/riscos/font.c @@ -112,7 +112,6 @@ struct font_data *font_open(struct font_set *set, struct css_style *style) unsigned int f = 0; font_f handle; os_error *error; - bool bold=false, italic=false; assert(set); assert(style); @@ -147,7 +146,6 @@ struct font_data *font_open(struct font_set *set, struct css_style *style) case CSS_FONT_WEIGHT_800: case CSS_FONT_WEIGHT_900: f += FONT_BOLD; - bold = true; break; default: break; @@ -157,7 +155,6 @@ struct font_data *font_open(struct font_set *set, struct css_style *style) case CSS_FONT_STYLE_ITALIC: case CSS_FONT_STYLE_OBLIQUE: f += FONT_SLANTED; - italic = true; break; default: break; @@ -174,9 +171,7 @@ struct font_data *font_open(struct font_set *set, struct css_style *style) if (error) { /* fall back to Homerton */ LOG(("font_find_font failed; falling back to Homerton")); - f = 0 + (bold ? FONT_BOLD : 0) + (italic ? FONT_SLANTED: 0); - - error = xfont_find_font(font_table[f], (int)size, (int)size, + error = xfont_find_font(font_table[f % 4], (int)size, (int)size, 0, 0, &handle, 0, 0); if (error) { LOG(("%i: %s\n", error->errnum, error->errmess)); -- cgit v1.2.3