summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xamiga/dist/NetSurf.guide2
-rwxr-xr-xamiga/dist/netsurf.readme7
-rw-r--r--amiga/font.c86
-rwxr-xr-xamiga/font.h5
-rw-r--r--amiga/options.h4
5 files changed, 83 insertions, 21 deletions
diff --git a/amiga/dist/NetSurf.guide b/amiga/dist/NetSurf.guide
index bf36383db..2bb8e0678 100755
--- a/amiga/dist/NetSurf.guide
+++ b/amiga/dist/NetSurf.guide
@@ -44,7 +44,7 @@ The options file is stored in @{"Resources/Options" link Resources/Options/Main}
@{b}recent_file@{ub} Path to file to store recent history list
@{b}arexx_dir@{ub} Path to ARexx scripts dir
@{b}download_dir@{ub} default download destination
-@{b}quick_text@{ub} disable for experimental Unicode display
+@{b}quick_text@{ub} enable for local charset text only (not recommended)
@{b}delay_redraw@{ub} slows down redraw interval
@endnode
diff --git a/amiga/dist/netsurf.readme b/amiga/dist/netsurf.readme
index cfefd584f..31712e920 100755
--- a/amiga/dist/netsurf.readme
+++ b/amiga/dist/netsurf.readme
@@ -2,9 +2,9 @@ Short: Fast CSS capable web browser
Uploader: chris@unsatisfactorysoftware.co.uk (Chris Young)
Author: NetSurf contributors (OS4 port by Chris Young)
Type: comm/www
-Version: 2.0 development (SVN 5591)
+Version: 2.0 development (SVN 5911)
Architecture: ppc-amigaos >= 4.0.0
-Requires: AISS, dev/c/pthreads.lha
+Requires: AISS
This is a preview release of the OS4 native port of NetSurf.
It is beta software, which means it is unstable and missing
@@ -14,6 +14,9 @@ This is provided for testing purposes only, to gain feedback
in order to fix bugs for the real release and to prioritise
features.
+IF YOU UPDATE AN OLDER VERSION YOU MAY NEED TO ADD
+screen_depth:32 TO YOUR RESOURCES/OPTIONS FILE
+
Please report bugs to chris@unsatisfactorysoftware.co.uk,
on the Amigans.net forums or in the bug tracker at
http://www.unsatisfactorysoftware.co.uk/bugs (the bug tracker
diff --git a/amiga/font.c b/amiga/font.c
index dec063558..da73c3167 100644
--- a/amiga/font.c
+++ b/amiga/font.c
@@ -35,8 +35,12 @@
#include "amiga/options.h"
#include <parserutils/charset/utf8.h>
#include <parserutils/charset/utf16.h>
+#include <proto/utility.h>
static struct OutlineFont *of[CSS_FONT_FAMILY_NOT_SET];
+static struct OutlineFont *ofb[CSS_FONT_FAMILY_NOT_SET];
+static struct OutlineFont *ofi[CSS_FONT_FAMILY_NOT_SET];
+static struct OutlineFont *ofbi[CSS_FONT_FAMILY_NOT_SET];
struct OutlineFont *ami_open_outline_font(struct css_style *style);
@@ -382,10 +386,45 @@ struct OutlineFont *ami_open_outline_font(struct css_style *style)
struct OutlineFont *ofont;
char *fontname;
WORD ysize;
+ int tstyle = 0;
- ofont = of[style->font_family];
+ switch(style->font_style)
+ {
+ case CSS_FONT_STYLE_ITALIC:
+ case CSS_FONT_STYLE_OBLIQUE:
+ tstyle += NSA_ITALIC;
+ break;
+ }
-/* see diskfont implementation for currently unimplemented bold/italic stuff */
+ switch(style->font_weight)
+ {
+ case CSS_FONT_WEIGHT_BOLD:
+ case CSS_FONT_WEIGHT_BOLDER:
+ tstyle += NSA_BOLD;
+ break;
+ }
+
+ switch(tstyle)
+ {
+ case NSA_ITALIC:
+ if(ofi[style->font_family]) ofont = ofi[style->font_family];
+ else ofont = of[style->font_family];
+ break;
+
+ case NSA_BOLD:
+ if(ofb[style->font_family]) ofont = ofb[style->font_family];
+ else ofont = of[style->font_family];
+ break;
+
+ case NSA_BOLDITALIC:
+ if(ofbi[style->font_family]) ofont = ofbi[style->font_family];
+ else ofont = of[style->font_family];
+ break;
+
+ default:
+ ofont = of[style->font_family];
+ break;
+ }
ysize = css_len2pt(&style->font_size.value.length, style);
@@ -498,25 +537,37 @@ void ami_init_fonts(void)
of[CSS_FONT_FAMILY_UNKNOWN] = OpenOutlineFont(option_font_sans,NULL,OFF_OPEN);
of[CSS_FONT_FAMILY_NOT_SET] = OpenOutlineFont(option_font_sans,NULL,OFF_OPEN);
-#if 0
for(i=CSS_FONT_FAMILY_SANS_SERIF;i<=CSS_FONT_FAMILY_NOT_SET;i++)
{
- if(EObtainInfo(&of[i]->olf_EEngine,
- OT_BName,&bname,
- OT_IName,&iname,
- OT_BIName,&biname,
- TAG_END) == 0)
+ if(!of[i]) warn_user("FontError",""); // temporary error message
+
+ if(bname = GetTagData(OT_BName,0,of[i]->olf_OTagList))
+ {
+ ofb[i] = OpenOutlineFont(bname,NULL,OFF_OPEN);
+ }
+ else
{
- printf("%s\n",bname);
+ ofb[i] = NULL;
+ }
- EReleaseInfo(&of[i]->olf_EEngine,
- OT_BName,bname,
- OT_IName,iname,
- OT_BIName,biname,
- TAG_END);
+ if(iname = GetTagData(OT_IName,0,of[i]->olf_OTagList))
+ {
+ ofi[i] = OpenOutlineFont(iname,NULL,OFF_OPEN);
+ }
+ else
+ {
+ ofi[i] = NULL;
+ }
+
+ if(biname = GetTagData(OT_BIName,0,of[i]->olf_OTagList))
+ {
+ ofbi[i] = OpenOutlineFont(biname,NULL,OFF_OPEN);
+ }
+ else
+ {
+ ofbi[i] = NULL;
}
}
-#endif
}
}
@@ -526,9 +577,12 @@ void ami_close_fonts(void)
if(!option_quick_text)
{
- for(i=0;i<=CSS_FONT_FAMILY_NOT_SET;i++)
+ for(i=CSS_FONT_FAMILY_SANS_SERIF;i<=CSS_FONT_FAMILY_NOT_SET;i++)
{
if(of[i]) CloseOutlineFont(of[i],NULL);
+ if(ofb[i]) CloseOutlineFont(ofb[i],NULL);
+ if(ofi[i]) CloseOutlineFont(ofi[i],NULL);
+ if(ofbi[i]) CloseOutlineFont(ofbi[i],NULL);
}
}
}
diff --git a/amiga/font.h b/amiga/font.h
index 59dd7b6fe..06bf85a13 100755
--- a/amiga/font.h
+++ b/amiga/font.h
@@ -22,6 +22,11 @@
#include "css/css.h"
#include <graphics/text.h>
+#define NSA_NORMAL 0
+#define NSA_ITALIC 1
+#define NSA_BOLD 2
+#define NSA_BOLDITALIC 3
+
struct TextFont *ami_open_font(struct css_style *);
void ami_close_font(struct TextFont *tfont);
ULONG ami_unicode_text(struct RastPort *rp,char *string,ULONG length,struct css_style *style,ULONG x,ULONG y,ULONG c);
diff --git a/amiga/options.h b/amiga/options.h
index 93205c011..1c62b1887 100644
--- a/amiga/options.h
+++ b/amiga/options.h
@@ -60,8 +60,8 @@ bool option_kiosk_mode = false; \
char *option_recent_file = 0; \
char *option_arexx_dir = 0; \
char *option_download_dir = 0; \
-bool option_quick_text = true; \
-bool option_redraw_on_intuiticks = true; \
+bool option_quick_text = false; \
+bool option_redraw_on_intuiticks = false; \
#define EXTRA_OPTION_TABLE \
{ "verbose_log", OPTION_BOOL, &option_verbose_log}, \