summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--riscos/dialog.c153
-rw-r--r--riscos/font.c197
-rw-r--r--riscos/gui.c54
-rw-r--r--riscos/gui.h2
-rw-r--r--riscos/options.h61
5 files changed, 248 insertions, 219 deletions
diff --git a/riscos/dialog.c b/riscos/dialog.c
index 96a72a9ba..ab14b1039 100644
--- a/riscos/dialog.c
+++ b/riscos/dialog.c
@@ -461,16 +461,20 @@ void ro_gui_dialog_click(wimp_pointer *pointer)
ro_gui_theme_install_click(pointer);
}
+
/**
* Redraw a dialog window
*/
-void ro_gui_dialog_redraw(wimp_draw *redraw) {
+
+void ro_gui_dialog_redraw(wimp_draw *redraw)
+{
os_error *error;
osbool more;
struct toolbar_display *display;
for (display = toolbars; display; display = display->next) {
- if ((display->toolbar) && (display->toolbar->toolbar_handle == redraw->w)) {
+ if ((display->toolbar) && (display->toolbar->toolbar_handle ==
+ redraw->w)) {
ro_gui_theme_redraw(display->toolbar, redraw);
return;
}
@@ -495,6 +499,7 @@ void ro_gui_dialog_redraw(wimp_draw *redraw) {
}
+
/**
* Prepare and open the Choices dialog.
*/
@@ -575,34 +580,34 @@ void ro_gui_dialog_config_prepare(void)
ro_gui_choices_font_min_size = option_font_min_size;
ro_gui_dialog_update_config_font();
ro_gui_set_icon_string(dialog_config_font, ICON_CONFIG_FONT_SANS,
- option_font_sans ? option_font_sans :
- "Homerton.Medium");
+ option_font_sans);
ro_gui_set_icon_string(dialog_config_font, ICON_CONFIG_FONT_SERIF,
- option_font_serif ? option_font_serif :
- "Trinity.Medium");
+ option_font_serif);
ro_gui_set_icon_string(dialog_config_font, ICON_CONFIG_FONT_MONO,
- option_font_mono ? option_font_mono :
- "Corpus.Medium");
+ option_font_mono);
ro_gui_set_icon_string(dialog_config_font, ICON_CONFIG_FONT_CURS,
- option_font_cursive ? option_font_cursive :
- "Homerton.Medium");
+ option_font_cursive);
ro_gui_set_icon_string(dialog_config_font, ICON_CONFIG_FONT_FANT,
- option_font_fantasy ? option_font_fantasy :
- "Homerton.Medium");
+ option_font_fantasy);
ro_gui_set_icon_string(dialog_config_font, ICON_CONFIG_FONT_DEF,
- option_font_default ? option_font_default :
- "Homerton.Medium");
- ro_gui_set_icon_selected_state(dialog_config_font,
- ICON_CONFIG_FONT_USE_UFONT, option_font_ufont);
+ css_font_family_name[option_font_default]);
/* image pane */
ro_gui_choices_fg_plot_style = option_fg_plot_style;
ro_gui_choices_bg_plot_style = option_bg_plot_style;
- ro_gui_dialog_set_image_quality(ICON_CONFIG_IMG_FG_DISP, option_fg_plot_style);
- ro_gui_dialog_set_image_quality(ICON_CONFIG_IMG_BG_DISP, option_bg_plot_style);
+ ro_gui_dialog_set_image_quality(ICON_CONFIG_IMG_FG_DISP,
+ option_fg_plot_style);
+ ro_gui_dialog_set_image_quality(ICON_CONFIG_IMG_BG_DISP,
+ option_bg_plot_style);
}
-void ro_gui_dialog_set_image_quality(int icon, unsigned int tinct_options) {
+
+/**
+ * Set an icon in the Image config window with Tinct options.
+ */
+
+void ro_gui_dialog_set_image_quality(int icon, unsigned int tinct_options)
+{
int i = 1;
if (tinct_options & tinct_USE_OS_SPRITE_OP) {
i = 0;
@@ -618,11 +623,15 @@ void ro_gui_dialog_set_image_quality(int icon, unsigned int tinct_options) {
}
+
/**
* Set the current options to the settings in the choices panes.
*/
-void ro_gui_dialog_config_set(void) {
+void ro_gui_dialog_config_set(void)
+{
+ char *font_default;
+
/* browser pane */
if (option_homepage_url)
free(option_homepage_url);
@@ -685,36 +694,30 @@ void ro_gui_dialog_config_set(void) {
/* font pane */
option_font_size = ro_gui_choices_font_size;
option_font_min_size = ro_gui_choices_font_min_size;
- if (option_font_sans)
- free(option_font_sans);
+ free(option_font_sans);
option_font_sans = strdup(ro_gui_get_icon_string(dialog_config_font,
ICON_CONFIG_FONT_SANS));
- if (option_font_serif)
- free(option_font_serif);
+ free(option_font_serif);
option_font_serif = strdup(ro_gui_get_icon_string(dialog_config_font,
ICON_CONFIG_FONT_SERIF));
- if (option_font_mono)
- free(option_font_mono);
+ free(option_font_mono);
option_font_mono = strdup(ro_gui_get_icon_string(dialog_config_font,
ICON_CONFIG_FONT_MONO));
- if (option_font_cursive)
- free(option_font_cursive);
+ free(option_font_cursive);
option_font_cursive = strdup(ro_gui_get_icon_string(
dialog_config_font, ICON_CONFIG_FONT_CURS));
- if (option_font_fantasy)
- free(option_font_fantasy);
+ free(option_font_fantasy);
option_font_fantasy = strdup(ro_gui_get_icon_string(
dialog_config_font, ICON_CONFIG_FONT_FANT));
- if (option_font_default)
- free(option_font_default);
- option_font_default = strdup(ro_gui_get_icon_string(
- dialog_config_font, ICON_CONFIG_FONT_DEF));
- option_font_ufont = ro_gui_get_icon_selected_state(
- dialog_config_font, ICON_CONFIG_FONT_USE_UFONT);
+ font_default = ro_gui_get_icon_string(dialog_config_font,
+ ICON_CONFIG_FONT_DEF);
+ option_font_default = css_font_family_parse(font_default,
+ strlen(font_default));
/* image pane */
if ((option_fg_plot_style != (int)ro_gui_choices_fg_plot_style) ||
- (option_bg_plot_style != (int)ro_gui_choices_bg_plot_style)) {
+ (option_bg_plot_style !=
+ (int) ro_gui_choices_bg_plot_style)) {
option_fg_plot_style = ro_gui_choices_fg_plot_style;
option_bg_plot_style = ro_gui_choices_bg_plot_style;
ro_gui_window_redraw_all();
@@ -1041,6 +1044,7 @@ void ro_gui_dialog_click_config_th_pane(wimp_pointer *pointer) {
}
}
+
/**
* Update font size icons in font choices pane.
*/
@@ -1058,9 +1062,11 @@ void ro_gui_dialog_update_config_font(void)
ICON_CONFIG_FONT_MINSIZE, s);
}
+
/**
* Handle clicks in the font choices pane
*/
+
void ro_gui_dialog_click_config_font(wimp_pointer *pointer)
{
int stepping = 1;
@@ -1116,18 +1122,21 @@ void ro_gui_dialog_click_config_font(wimp_pointer *pointer)
case ICON_CONFIG_FONT_MONO_PICK:
case ICON_CONFIG_FONT_CURS_PICK:
case ICON_CONFIG_FONT_FANT_PICK:
- case ICON_CONFIG_FONT_DEF_PICK:
- config_font_icon = pointer->i - 1;
+ /*config_font_icon = pointer->i - 1;
ro_gui_display_font_menu(ro_gui_get_icon_string(
dialog_config_font, pointer->i - 1),
- dialog_config_font, pointer->i);
+ dialog_config_font, pointer->i);*/
+ break;
+ case ICON_CONFIG_FONT_DEF_PICK:
break;
}
}
+
/**
- * Handle font menu selections
+ * Handle font menu selections.
*/
+
void ro_gui_dialog_font_menu_selection(char *name)
{
char *n, *fn;
@@ -1147,57 +1156,14 @@ void ro_gui_dialog_font_menu_selection(char *name)
}
strncpy(fn, n, len);
-
- switch (config_font_icon) {
- case ICON_CONFIG_FONT_SANS:
- if (option_font_sans)
- free(option_font_sans);
- option_font_sans = strdup(fn);
- ro_gui_set_icon_string(dialog_config_font,
- config_font_icon, fn);
- break;
- case ICON_CONFIG_FONT_SERIF:
- if (option_font_serif)
- free(option_font_serif);
- option_font_serif = strdup(fn);
- ro_gui_set_icon_string(dialog_config_font,
- config_font_icon, fn);
- break;
- case ICON_CONFIG_FONT_MONO:
- if (option_font_mono)
- free(option_font_mono);
- option_font_mono = strdup(fn);
- ro_gui_set_icon_string(dialog_config_font,
- config_font_icon, fn);
- break;
- case ICON_CONFIG_FONT_CURS:
- if (option_font_cursive)
- free(option_font_cursive);
- option_font_cursive = strdup(fn);
- ro_gui_set_icon_string(dialog_config_font,
- config_font_icon, fn);
- break;
- case ICON_CONFIG_FONT_FANT:
- if (option_font_fantasy)
- free(option_font_fantasy);
- option_font_fantasy = strdup(fn);
- ro_gui_set_icon_string(dialog_config_font,
- config_font_icon, fn);
- break;
- case ICON_CONFIG_FONT_DEF:
- if (option_font_default)
- free(option_font_default);
- option_font_default = strdup(fn);
- ro_gui_set_icon_string(dialog_config_font,
- config_font_icon, fn);
- break;
- }
+ ro_gui_set_icon_string(dialog_config_font, config_font_icon, fn);
free(fn);
config_font_icon = -1;
}
+
/**
* Handle clicks in the Scale view dialog.
*/
@@ -1251,9 +1217,11 @@ void ro_gui_dialog_click_zoom(wimp_pointer *pointer)
* Resets the Scale view dialog.
*/
-void ro_gui_dialog_reset_zoom(void) {
+void ro_gui_dialog_reset_zoom(void)
+{
char scale_buffer[8];
- sprintf(scale_buffer, "%.0f", ro_gui_current_zoom_gui->option.scale * 100);
+ sprintf(scale_buffer, "%.0f",
+ ro_gui_current_zoom_gui->option.scale * 100);
ro_gui_set_icon_string(dialog_zoom, ICON_ZOOM_VALUE, scale_buffer);
}
@@ -1338,7 +1306,9 @@ const char *language_name(const char *code)
/**
* Loads and nests all available themes in the theme pane.
*/
-void ro_gui_dialog_load_themes(void) {
+
+void ro_gui_dialog_load_themes(void)
+{
os_error *error;
os_box extent = { 0, 0, 0, 0 };
struct theme_descriptor *descriptor;
@@ -1496,7 +1466,9 @@ void ro_gui_dialog_load_themes(void) {
/**
* Removes and closes all themes in the theme pane.
*/
-void ro_gui_dialog_free_themes(void) {
+
+void ro_gui_dialog_free_themes(void)
+{
struct toolbar_display *toolbar;
struct toolbar_display *next_toolbar;
@@ -1521,4 +1493,3 @@ void ro_gui_dialog_free_themes(void) {
theme_count = 0;
theme_choice = NULL;
}
-
diff --git a/riscos/font.c b/riscos/font.c
index 3b63cf633..ee9229b7d 100644
--- a/riscos/font.c
+++ b/riscos/font.c
@@ -12,20 +12,162 @@
*/
#include <assert.h>
+#include <string.h>
#include "rufl.h"
#include "netsurf/css/css.h"
#include "netsurf/render/font.h"
#include "netsurf/riscos/gui.h"
#include "netsurf/riscos/options.h"
#include "netsurf/utils/log.h"
+#include "netsurf/utils/messages.h"
+#include "netsurf/utils/utils.h"
+static void nsfont_check_option(char **option, const char *family,
+ const char *fallback);
+static bool nsfont_exists(const char *font_family);
+static int nsfont_list_cmp(const void *keyval, const void *datum);
+static void nsfont_check_fonts(void);
static void nsfont_read_style(const struct css_style *style,
const char **font_family, unsigned int *font_size,
rufl_style *font_style);
/**
+ * Initialize font handling.
+ *
+ * Exits through die() on error.
+ */
+
+void nsfont_init(void)
+{
+ const char *fallback = "Homerton";
+ rufl_code code;
+
+ nsfont_check_fonts();
+
+ code = rufl_init();
+ if (code != rufl_OK) {
+ if (code == rufl_FONT_MANAGER_ERROR)
+ LOG(("rufl_init: rufl_FONT_MANAGER_ERROR: 0x%x: %s",
+ rufl_fm_error->errnum,
+ rufl_fm_error->errmess));
+ else
+ LOG(("rufl_init: 0x%x", code));
+ die("The Unicode font library could not be initialized. "
+ "Please report this to the developers.");
+ }
+
+ if (rufl_family_list_entries == 0)
+ die("No fonts could be found. At least one font must be "
+ "installed.");
+
+ if (!nsfont_exists("Homerton"))
+ fallback = rufl_family_list[0];
+
+ nsfont_check_option(&option_font_sans, "Homerton", fallback);
+ nsfont_check_option(&option_font_serif, "Trinity", fallback);
+ nsfont_check_option(&option_font_mono, "Corpus", fallback);
+ nsfont_check_option(&option_font_cursive, "Churchill", fallback);
+ nsfont_check_option(&option_font_fantasy, "Sassoon", fallback);
+
+ if (option_font_default != CSS_FONT_FAMILY_SANS_SERIF &&
+ option_font_default != CSS_FONT_FAMILY_SERIF &&
+ option_font_default != CSS_FONT_FAMILY_MONOSPACE &&
+ option_font_default != CSS_FONT_FAMILY_CURSIVE &&
+ option_font_default != CSS_FONT_FAMILY_FANTASY)
+ option_font_default = CSS_FONT_FAMILY_SANS_SERIF;
+}
+
+
+/**
+ * Check that a font option is valid, and fix it if not.
+ *
+ * \param option pointer to option, as used by options.[ch]
+ * \param family font family to use if option is not set, or the set
+ * family is not available
+ * \param fallback font family to use if family is not available either
+ */
+
+void nsfont_check_option(char **option, const char *family,
+ const char *fallback)
+{
+ if (*option && !nsfont_exists(*option)) {
+ free(*option);
+ *option = 0;
+ }
+ if (!*option) {
+ if (nsfont_exists(family))
+ *option = strdup(family);
+ else
+ *option = strdup(fallback);
+ }
+}
+
+
+/**
+ * Check if a font family is available.
+ *
+ * \param font_family name of font family
+ * \return true if the family is available
+ */
+
+bool nsfont_exists(const char *font_family)
+{
+ if (bsearch(font_family, rufl_family_list,
+ rufl_family_list_entries, sizeof rufl_family_list[0],
+ nsfont_list_cmp))
+ return true;
+ return false;
+}
+
+
+int nsfont_list_cmp(const void *keyval, const void *datum)
+{
+ const char *key = keyval;
+ const char * const *entry = datum;
+ return strcmp(key, *entry);
+}
+
+
+/**
+ * Check that at least Homerton.Medium is available.
+ */
+
+void nsfont_check_fonts(void)
+{
+ char s[252];
+ font_f font;
+ os_error *error;
+
+ error = xfont_find_font("Homerton.Medium\\ELatin1",
+ 160, 160, 0, 0, &font, 0, 0);
+ if (error) {
+ if (error->errnum == error_FILE_NOT_FOUND) {
+ xwimp_start_task("TaskWindow -wimpslot 200K -quit "
+ "<NetSurf$Dir>.FixFonts", 0);
+ die("FontBadInst");
+ } else {
+ LOG(("xfont_find_font: 0x%x: %s",
+ error->errnum, error->errmess));
+ snprintf(s, sizeof s, messages_get("FontError"),
+ error->errmess);
+ die(s);
+ }
+ }
+
+ error = xfont_lose_font(font);
+ if (error) {
+ LOG(("xfont_lose_font: 0x%x: %s",
+ error->errnum, error->errmess));
+ snprintf(s, sizeof s, messages_get("FontError"),
+ error->errmess);
+ die(s);
+ }
+}
+
+
+/**
* Measure the width of a string.
*
* \param style css_style for this text, with style->font_size.size ==
@@ -228,8 +370,6 @@ void nsfont_read_style(const struct css_style *style,
const char **font_family, unsigned int *font_size,
rufl_style *font_style)
{
- *font_family = "Homerton";
-
assert(style->font_size.size == CSS_FONT_SIZE_LENGTH);
*font_size = css_len2px(&style->font_size.value.length, style) *
72.0 / 90.0 * 16.;
@@ -238,26 +378,47 @@ void nsfont_read_style(const struct css_style *style,
if (1600 < *font_size)
*font_size = 1600;
+ switch (style->font_family) {
+ case CSS_FONT_FAMILY_SANS_SERIF:
+ *font_family = option_font_sans;
+ break;
+ case CSS_FONT_FAMILY_SERIF:
+ *font_family = option_font_serif;
+ break;
+ case CSS_FONT_FAMILY_MONOSPACE:
+ *font_family = option_font_mono;
+ break;
+ case CSS_FONT_FAMILY_CURSIVE:
+ *font_family = option_font_cursive;
+ break;
+ case CSS_FONT_FAMILY_FANTASY:
+ *font_family = option_font_fantasy;
+ break;
+ default:
+ *font_family = option_font_sans;
+ break;
+ }
+
switch (style->font_style) {
- case CSS_FONT_STYLE_ITALIC:
- case CSS_FONT_STYLE_OBLIQUE:
- *font_style = rufl_SLANTED;
- break;
- default:
- *font_style = rufl_REGULAR;
- break;
+ case CSS_FONT_STYLE_ITALIC:
+ case CSS_FONT_STYLE_OBLIQUE:
+ *font_style = rufl_SLANTED;
+ break;
+ default:
+ *font_style = rufl_REGULAR;
+ break;
}
switch (style->font_weight) {
- case CSS_FONT_WEIGHT_BOLD:
- case CSS_FONT_WEIGHT_600:
- case CSS_FONT_WEIGHT_700:
- case CSS_FONT_WEIGHT_800:
- case CSS_FONT_WEIGHT_900:
- *font_style += rufl_BOLD;
- break;
- default:
- break;
+ case CSS_FONT_WEIGHT_BOLD:
+ case CSS_FONT_WEIGHT_600:
+ case CSS_FONT_WEIGHT_700:
+ case CSS_FONT_WEIGHT_800:
+ case CSS_FONT_WEIGHT_900:
+ *font_style += rufl_BOLD;
+ break;
+ default:
+ break;
}
}
diff --git a/riscos/gui.c b/riscos/gui.c
index 067921fa5..cee09ef8d 100644
--- a/riscos/gui.c
+++ b/riscos/gui.c
@@ -149,7 +149,6 @@ struct ro_gui_poll_block {
struct ro_gui_poll_block *ro_gui_poll_queued_blocks = 0;
static void ro_gui_choose_language(void);
-static void ro_gui_check_fonts(void);
static void ro_gui_sprites_init(void);
static void ro_gui_icon_bar_create(void);
static void ro_gui_signal(int sig);
@@ -188,7 +187,6 @@ void gui_init(int argc, char** argv)
os_error *error;
int length;
struct theme_descriptor *descriptor = NULL;
- rufl_code code;
xhourglass_start(1);
@@ -253,22 +251,7 @@ void gui_init(int argc, char** argv)
die(error->errmess);
}
-#ifndef ncos
- /* We don't need to check the fonts on NCOS */
- ro_gui_check_fonts();
-#endif
-
- code = rufl_init();
- if (code != rufl_OK) {
- if (code == rufl_FONT_MANAGER_ERROR)
- LOG(("rufl_init: rufl_FONT_MANAGER_ERROR: 0x%x: %s",
- rufl_fm_error->errnum,
- rufl_fm_error->errmess));
- else
- LOG(("rufl_init: 0x%x", code));
- die("The Unicode font library could not be initialized. "
- "Please report this to the developers.");
- }
+ nsfont_init();
/* Issue a *Desktop to poke AcornURI into life */
if (getenv("NetSurf$Start_URI_Handler"))
@@ -307,13 +290,13 @@ void gui_init(int argc, char** argv)
descriptor = ro_gui_theme_find("Aletheia");
ro_gui_theme_apply(descriptor);
- /* We don't create an Iconbar icon on NCOS */
#ifndef ncos
ro_gui_icon_bar_create();
#endif
ro_gui_check_resolvers();
}
+
/**
* Determine the language to use.
*
@@ -373,39 +356,6 @@ void ro_gui_choose_language(void)
/**
- * Check that at least Homerton.Medium is available.
- */
-
-void ro_gui_check_fonts(void)
-{
- char s[252];
- font_f font;
- os_error *error;
-
- error = xfont_find_font("Homerton.Medium\\ELatin1",
- 160, 160, 0, 0, &font, 0, 0);
- if (error) {
- if (error->errnum == error_FILE_NOT_FOUND) {
- xwimp_start_task("TaskWindow -wimpslot 200K -quit "
- "<NetSurf$Dir>.FixFonts", 0);
- die("FontBadInst");
- } else {
- snprintf(s, sizeof s, messages_get("FontError"),
- error->errmess);
- die(s);
- }
- }
-
- error = xfont_lose_font(font);
- if (error) {
- snprintf(s, sizeof s, messages_get("FontError"),
- error->errmess);
- die(s);
- }
-}
-
-
-/**
* Load resource sprites (pointers and misc icons).
*/
diff --git a/riscos/gui.h b/riscos/gui.h
index 4e2921056..85e9ea391 100644
--- a/riscos/gui.h
+++ b/riscos/gui.h
@@ -250,6 +250,7 @@ void ro_gui_print_click(wimp_pointer *pointer);
bool ro_gui_print_keypress(wimp_key *key);
/* in font.c */
+void nsfont_init(void);
bool nsfont_paint(struct css_style *style, const char *string,
size_t length, int x, int y, float scale);
@@ -351,7 +352,6 @@ void ro_gui_theme_install_click(wimp_pointer *pointer);
#define ICON_CONFIG_FONT_MINSIZE 17
#define ICON_CONFIG_FONT_MINSIZE_DEC 18
#define ICON_CONFIG_FONT_MINSIZE_INC 19
-#define ICON_CONFIG_FONT_USE_UFONT 20
#define ICON_DOWNLOAD_ICON 0
#define ICON_DOWNLOAD_URL 1
diff --git a/riscos/options.h b/riscos/options.h
index db140b9dd..51d4ec13c 100644
--- a/riscos/options.h
+++ b/riscos/options.h
@@ -14,6 +14,7 @@
#ifndef _NETSURF_RISCOS_OPTIONS_H_
#define _NETSURF_RISCOS_OPTIONS_H_
+#include "netsurf/css/css.h"
#include "netsurf/desktop/options.h"
#include "netsurf/riscos/tinct.h"
@@ -47,30 +48,14 @@ extern char *option_homepage_url;
extern bool option_open_browser_at_startup;
extern bool option_no_plugins;
extern char *option_font_sans;
-extern char *option_font_sans_italic;
-extern char *option_font_sans_bold;
-extern char *option_font_sans_bold_italic;
extern char *option_font_serif;
-extern char *option_font_serif_italic;
-extern char *option_font_serif_bold;
-extern char *option_font_serif_bold_italic;
extern char *option_font_mono;
-extern char *option_font_mono_italic;
-extern char *option_font_mono_bold;
-extern char *option_font_mono_bold_italic;
extern char *option_font_cursive;
-extern char *option_font_cursive_italic;
-extern char *option_font_cursive_bold;
-extern char *option_font_cursive_bold_italic;
extern char *option_font_fantasy;
-extern char *option_font_fantasy_italic;
-extern char *option_font_fantasy_bold;
-extern char *option_font_fantasy_bold_italic;
-extern char *option_font_default;
+extern int option_font_default; /* a css_font_family */
extern char *option_font_default_italic;
extern char *option_font_default_bold;
extern char *option_font_default_bold_italic;
-extern bool option_font_ufont;
extern int option_screen_cache;
extern bool option_block_popups;
extern bool option_url_suggestion;
@@ -106,30 +91,11 @@ char *option_homepage_url = 0; \
bool option_open_browser_at_startup = false; \
bool option_no_plugins = false; \
char *option_font_sans = 0; \
-char *option_font_sans_italic = 0; \
-char *option_font_sans_bold = 0; \
-char *option_font_sans_bold_italic = 0; \
char *option_font_serif = 0; \
-char *option_font_serif_italic = 0; \
-char *option_font_serif_bold = 0; \
-char *option_font_serif_bold_italic = 0; \
char *option_font_mono = 0; \
-char *option_font_mono_italic = 0; \
-char *option_font_mono_bold = 0; \
-char *option_font_mono_bold_italic = 0; \
char *option_font_cursive = 0; \
-char *option_font_cursive_italic = 0; \
-char *option_font_cursive_bold = 0; \
-char *option_font_cursive_bold_italic = 0; \
char *option_font_fantasy = 0; \
-char *option_font_fantasy_italic = 0; \
-char *option_font_fantasy_bold = 0; \
-char *option_font_fantasy_bold_italic = 0; \
-char *option_font_default = 0; \
-char *option_font_default_italic = 0; \
-char *option_font_default_bold = 0; \
-char *option_font_default_bold_italic = 0; \
-bool option_font_ufont = false; \
+int option_font_default = CSS_FONT_FAMILY_SANS_SERIF; \
int option_screen_cache = 0; \
bool option_block_popups = false; \
bool option_url_suggestion = true;
@@ -165,30 +131,11 @@ bool option_url_suggestion = true;
{ "open_browser_at_startup",OPTION_BOOL, &option_open_browser_at_startup }, \
{ "no_plugins", OPTION_BOOL, &option_no_plugins }, \
{ "font_sans", OPTION_STRING, &option_font_sans }, \
-{ "font_sans_italic", OPTION_STRING, &option_font_sans_italic }, \
-{ "font_sans_bold", OPTION_STRING, &option_font_sans_bold }, \
-{ "font_sans_bold_italic", OPTION_STRING, &option_font_sans_bold_italic }, \
{ "font_serif", OPTION_STRING, &option_font_serif }, \
-{ "font_serif_italic", OPTION_STRING, &option_font_serif_italic }, \
-{ "font_serif_bold", OPTION_STRING, &option_font_serif_bold }, \
-{ "font_serif_bold_italic", OPTION_STRING, &option_font_serif_bold_italic }, \
{ "font_mono", OPTION_STRING, &option_font_mono }, \
-{ "font_mono_italic", OPTION_STRING, &option_font_mono_italic }, \
-{ "font_mono_bold", OPTION_STRING, &option_font_mono_bold }, \
-{ "font_mono_bold_italic", OPTION_STRING, &option_font_mono_bold_italic }, \
{ "font_cursive", OPTION_STRING, &option_font_cursive }, \
-{ "font_cursive_italic", OPTION_STRING, &option_font_cursive_italic }, \
-{ "font_cursive_bold", OPTION_STRING, &option_font_cursive_bold }, \
-{ "font_cursive_bold_italic", OPTION_STRING, &option_font_cursive_bold_italic }, \
{ "font_fantasy", OPTION_STRING, &option_font_fantasy }, \
-{ "font_fantasy_italic", OPTION_STRING, &option_font_fantasy_italic }, \
-{ "font_fantasy_bold", OPTION_STRING, &option_font_fantasy_bold }, \
-{ "font_fantasy_bold_italic", OPTION_STRING, &option_font_fantasy_bold_italic }, \
-{ "font_default", OPTION_STRING, &option_font_default }, \
-{ "font_default_italic", OPTION_STRING, &option_font_default_italic }, \
-{ "font_default_bold", OPTION_STRING, &option_font_default_bold }, \
-{ "font_default_bold_italic", OPTION_STRING, &option_font_default_bold_italic }, \
-{ "font_ufont", OPTION_BOOL, &option_font_ufont }, \
+{ "font_default", OPTION_INTEGER, &option_font_default }, \
{ "screen_cache", OPTION_INTEGER, &option_screen_cache }, \
{ "block_popups", OPTION_BOOL, &option_block_popups }, \
{ "url_suggestion", OPTION_BOOL, &option_url_suggestion }