diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2010-05-06 10:02:58 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2010-05-06 10:02:58 +0000 |
commit | f55c11dbd6cb3242570eeb022b772ec236fe8603 (patch) | |
tree | b9ba462d15bb7f68c65d8727c214e4c0ee8e6787 /amiga/gui.c | |
parent | 0807b405139259e719115b99755cc4a6153542f6 (diff) | |
download | netsurf-f55c11dbd6cb3242570eeb022b772ec236fe8603.tar.gz netsurf-f55c11dbd6cb3242570eeb022b772ec236fe8603.tar.bz2 |
Amiga font code revamped and fixed. Will now fall back to a different font if the
character isn't present in the current one, this needs a complete or near-complete
Unicode font in order to be useful - Code2000 and Bitstream Cyberbit are auto-detected
by NetSurf on startup if none is configured. Japanese websites now display correctly,
along with Japanese characters within Google UK search results etc.
svn path=/trunk/netsurf/; revision=10551
Diffstat (limited to 'amiga/gui.c')
-rwxr-xr-x | amiga/gui.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/amiga/gui.c b/amiga/gui.c index 47aee25e7..cf47ebc5e 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -299,6 +299,7 @@ void ami_open_resources(void) void ami_set_options(void) { STRPTR tempacceptlangs; + BPTR lock = 0; /* The following line disables the popupmenu.class select menu ** This will become a user option when/if popupmenu.class is @@ -364,6 +365,23 @@ void ami_set_options(void) if((!option_font_fantasy) || (option_font_fantasy[0] == '\0')) option_font_fantasy = (char *)strdup("DejaVu Serif"); + if((!option_font_unicode) || (option_font_unicode[0] == '\0')) + { + /* Search for some likely candidates */ + + if(lock=Lock("FONTS:Code2000.font",ACCESS_READ)) + { + UnLock(lock); + option_font_unicode = (char *)strdup("Code2000"); + } + else if(lock=Lock("FONTS:Bitstream Cyberbit.font",ACCESS_READ)) + { + UnLock(lock); + option_font_unicode = (char *)strdup("Bitstream Cyberbit"); + } + else option_font_unicode = (char *)strdup("Deja Vu Sans"); + } + if((!option_theme) || (option_theme[0] == '\0')) option_theme = (char *)strdup("PROGDIR:Resources/Themes/Default"); |