summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
Diffstat (limited to 'render')
-rw-r--r--render/box.c12
-rw-r--r--render/box.h4
-rw-r--r--render/font.h30
-rw-r--r--render/layout.c12
4 files changed, 41 insertions, 17 deletions
diff --git a/render/box.c b/render/box.c
index aee750bc1..27b4fceae 100644
--- a/render/box.c
+++ b/render/box.c
@@ -17,10 +17,10 @@
#include "netsurf/content/fetchcache.h"
#include "netsurf/css/css.h"
#include "netsurf/render/box.h"
+#include "netsurf/render/font.h"
#include "netsurf/render/html.h"
#ifdef riscos
#include "netsurf/desktop/gui.h"
-#include "netsurf/riscos/font.h"
#include "netsurf/riscos/plugin.h"
#endif
#define NDEBUG
@@ -1691,12 +1691,12 @@ bool plugin_decode(struct content* content, char* url, struct box* box,
* we can't handle this object.
*/
if(po->data == 0 && po->classid == 0) {
- return FALSE;
+ return false;
}
if(po->data == 0 && po->classid != 0) {
if(strncasecmp(po->classid, "clsid:", 6) == 0) {
LOG(("ActiveX object - n0"));
- return FALSE;
+ return false;
}
else {
url = url_join(po->classid, po->codebase);
@@ -1718,11 +1718,11 @@ bool plugin_decode(struct content* content, char* url, struct box* box,
*/
if(po->type != 0) {
if (content_lookup(po->type) == CONTENT_OTHER)
- return FALSE;
+ return false;
}
if(po->codetype != 0) {
if (content_lookup(po->codetype) == CONTENT_OTHER)
- return FALSE;
+ return false;
}
/* If we've got to here, the object declaration has provided us with
@@ -1734,6 +1734,6 @@ bool plugin_decode(struct content* content, char* url, struct box* box,
*/
html_fetch_object(content, url, box);
- return TRUE;
+ return true;
}
diff --git a/render/box.h b/render/box.h
index dfb0a2603..4ec60d791 100644
--- a/render/box.h
+++ b/render/box.h
@@ -12,9 +12,7 @@
#include <limits.h>
#include "libxml/HTMLparser.h"
#include "netsurf/css/css.h"
-#ifdef riscos
-#include "netsurf/riscos/font.h"
-#endif
+#include "netsurf/render/font.h"
/**
* structures
diff --git a/render/font.h b/render/font.h
new file mode 100644
index 000000000..80d8a2f2f
--- /dev/null
+++ b/render/font.h
@@ -0,0 +1,30 @@
+/*
+ * This file is part of NetSurf, http://netsurf.sourceforge.net/
+ * Licensed under the GNU General Public License,
+ * http://www.opensource.org/licenses/gpl-license
+ * Copyright 2003 Phil Mellor <monkeyson@users.sourceforge.net>
+ * Copyright 2003 James Bursa <bursa@users.sourceforge.net>
+ */
+
+#ifndef _NETSURF_RISCOS_FONT_H_
+#define _NETSURF_RISCOS_FONT_H_
+
+#include "netsurf/css/css.h"
+
+struct font_data {
+ int handle;
+ unsigned int size;
+ unsigned int space_width;
+ struct font_data *next;
+};
+
+struct font_set *font_new_set(void);
+struct font_data *font_open(struct font_set *set, struct css_style *style);
+void font_free_set(struct font_set *set);
+unsigned long font_width(struct font_data *font, const char * text, unsigned int length);
+void font_position_in_string(const char* text, struct font_data *font,
+ unsigned int length, unsigned long x, int* char_offset, int* pixel_offset);
+char * font_split(struct font_data *data, const char * text, unsigned int length,
+ unsigned int width, unsigned int *used_width);
+
+#endif
diff --git a/render/layout.c b/render/layout.c
index 7949d1d3a..369f77491 100644
--- a/render/layout.c
+++ b/render/layout.c
@@ -12,21 +12,17 @@
#include <stdlib.h>
#include <string.h>
#include "libxml/HTMLparser.h"
+#include "netsurf/content/content.h"
+#include "netsurf/css/css.h"
#ifdef riscos
#include "netsurf/desktop/gui.h"
#endif
-#include "netsurf/content/content.h"
#include "netsurf/render/box.h"
-#include "netsurf/css/css.h"
+#include "netsurf/render/font.h"
#include "netsurf/render/layout.h"
-#ifdef riscos
-#include "netsurf/riscos/font.h"
-#else
-#include "netsurf/debug/fontd.h"
-#endif
-#include "netsurf/utils/utils.h"
#define NDEBUG
#include "netsurf/utils/log.h"
+#include "netsurf/utils/utils.h"
/**
* internal functions