summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2016-01-27 23:53:27 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2016-01-27 23:53:27 +0000
commitee640b80bc0a0bbe2dd5cd67f9d6381c4b63cc8f (patch)
treeb09c8111fb55ed7f1c2a8a497fbf21129e36186e
parent5afd42aa5a9ce1561fa1a6d73980b23cb612cda7 (diff)
downloadnetsurf-ee640b80bc0a0bbe2dd5cd67f9d6381c4b63cc8f.tar.gz
netsurf-ee640b80bc0a0bbe2dd5cd67f9d6381c4b63cc8f.tar.bz2
Add a GUI prefs option on OS3 only, to toggle between bitmap and outline fonts
"Allow bitmap fonts" causes NetSurf to use diskfont and graphics library routines for opening and displaying fonts. This allows bitmap fonts to be used which are much faster on 68k hardware than outline fonts, but loses the ability to render pages in UTF-8. Conversely, toggling this option off makes NetSurf use bullet.library directly and render glyphs itself, which precludes the usage of bitmap fonts but allows the full range of UTF-8 characters to be displayed. This option is ON by default on OS3 for speed reasons, and OFF by default on OS4. Additionally, this option is not shown on the prefs GUI on OS4 as the speed difference between bitmap and outline fonts is negligible on that hardware and I don't want to encourage the use of an option which provides inferior rendering.
-rwxr-xr-xamiga/gui_options.c23
-rw-r--r--resources/FatMessages5
2 files changed, 27 insertions, 1 deletions
diff --git a/amiga/gui_options.c b/amiga/gui_options.c
index 54652b3d1..cbd393eaa 100755
--- a/amiga/gui_options.c
+++ b/amiga/gui_options.c
@@ -122,6 +122,7 @@ enum
GID_OPTS_FONT_SIZE,
GID_OPTS_FONT_MINSIZE,
GID_OPTS_FONT_ANTIALIASING,
+ GID_OPTS_FONT_BITMAP,
GID_OPTS_CACHE_MEM,
GID_OPTS_CACHE_DISC,
GID_OPTS_OVERWRITE,
@@ -375,6 +376,7 @@ static void ami_gui_opts_setup(struct ami_gui_opts_window *gow)
gadlab[GID_OPTS_FONT_SIZE] = (char *)ami_utf8_easy((char *)messages_get("Default"));
gadlab[GID_OPTS_FONT_MINSIZE] = (char *)ami_utf8_easy((char *)messages_get("Minimum"));
gadlab[GID_OPTS_FONT_ANTIALIASING] = (char *)ami_utf8_easy((char *)messages_get("FontAntialiasing"));
+ gadlab[GID_OPTS_FONT_BITMAP] = (char *)ami_utf8_easy((char *)messages_get("FontBitmap"));
gadlab[GID_OPTS_CACHE_MEM] = (char *)ami_utf8_easy((char *)messages_get("Size"));
gadlab[GID_OPTS_CACHE_DISC] = (char *)ami_utf8_easy((char *)messages_get("Size"));
gadlab[GID_OPTS_OVERWRITE] = (char *)ami_utf8_easy((char *)messages_get("ConfirmOverwrite"));
@@ -1235,6 +1237,14 @@ void ami_gui_opts_open(void)
GA_Disabled, TRUE,
#endif
CheckBoxEnd,
+#ifndef __amigaos4__
+ LAYOUT_AddChild, gow->objects[GID_OPTS_FONT_BITMAP] = CheckBoxObj,
+ GA_ID, GID_OPTS_FONT_BITMAP,
+ GA_RelVerify, TRUE,
+ GA_Text, gadlab[GID_OPTS_FONT_BITMAP],
+ GA_Selected, nsoption_bool(bitmap_fonts),
+ CheckBoxEnd,
+#endif
LayoutEnd,
LayoutEnd,
CHILD_WeightedHeight, 0,
@@ -1863,7 +1873,18 @@ static void ami_gui_opts_use(bool save)
} else {
nsoption_set_bool(font_antialiasing, false);
}
-
+
+#ifndef __amigaos4__
+ GetAttr(GA_Selected, gow->objects[GID_OPTS_FONT_BITMAP], (ULONG *)&data);
+ ami_font_fini();
+ if(data) {
+ nsoption_set_bool(bitmap_fonts, true);
+ } else {
+ nsoption_set_bool(bitmap_fonts, false);
+ }
+ ami_font_init();
+#endif
+
GetAttr(INTEGER_Number,gow->objects[GID_OPTS_CACHE_MEM],(ULONG *)&nsoption_int(memory_cache_size));
nsoption_set_int(memory_cache_size, nsoption_int(memory_cache_size) * 1048576);
diff --git a/resources/FatMessages b/resources/FatMessages
index 0c3e8f9d5..67de72a62 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -6147,6 +6147,11 @@ de.ami.FontAntialiasing:Use anti-aliasing (when possible)
fr.ami.FontAntialiasing:Utiliser l'anticrénelage (si possible)
it.ami.FontAntialiasing:Usa anti-aliasing (quando possibile)
nl.ami.FontAntialiasing:Anti-aliasing (indien mogelijk) gebruiken
+en.ami.FontBitmap:Allow bitmap fonts
+de.ami.FontBitmap:Allow bitmap fonts
+fr.ami.FontBitmap:Allow bitmap fonts
+it.ami.FontBitmap:Allow bitmap fonts
+nl.ami.FontBitmap:Allow bitmap fonts
# Font scanning
en.ami.FontScanning:Scanning fonts...