r4713 joty - in /branches/adamblokus/netsurf: beos/beos_font.cpp riscos/font.c

netsurf at semichrome.net netsurf at semichrome.net
Sun Jul 20 16:13:10 BST 2008


Author: joty
Date: Sun Jul 20 10:13:10 2008
New Revision: 4713

URL: http://source.netsurf-browser.org?rev=4713&view=rev
Log:
Follow change r4517 for RISC OS and BeOS platforms : Added pdf font handling and rendering functions with the use of Haru functions.

Modified:
    branches/adamblokus/netsurf/beos/beos_font.cpp
    branches/adamblokus/netsurf/riscos/font.c

Modified: branches/adamblokus/netsurf/beos/beos_font.cpp
URL: http://source.netsurf-browser.org/branches/adamblokus/netsurf/beos/beos_font.cpp?rev=4713&r1=4712&r2=4713&view=diff
==============================================================================
--- branches/adamblokus/netsurf/beos/beos_font.cpp (original)
+++ branches/adamblokus/netsurf/beos/beos_font.cpp Sun Jul 20 10:13:10 2008
@@ -44,6 +44,21 @@
 
 static void nsfont_style_to_font(BFont &font, 
 		const struct css_style *style);
+static bool nsfont_width(const struct css_style *style,
+		const char *string, size_t length,
+		int *width);
+static bool nsfont_position_in_string(const struct css_style *style,
+		const char *string, size_t length,
+		int x, size_t *char_offset, int *actual_x);
+static bool nsfont_split(const struct css_style *style,
+		const char *string, size_t length,
+		int x, size_t *char_offset, int *actual_x);
+
+const struct font_functions nsfont = {
+	nsfont_width,
+	nsfont_position_in_string,
+	nsfont_split
+};
 
 /**
  * Measure the width of a string.

Modified: branches/adamblokus/netsurf/riscos/font.c
URL: http://source.netsurf-browser.org/branches/adamblokus/netsurf/riscos/font.c?rev=4713&r1=4712&r2=4713&view=diff
==============================================================================
--- branches/adamblokus/netsurf/riscos/font.c (original)
+++ branches/adamblokus/netsurf/riscos/font.c Sun Jul 20 10:13:10 2008
@@ -35,20 +35,32 @@
 #include "utils/messages.h"
 #include "utils/utils.h"
 
-
-/** desktop font, size and style being used */
-char ro_gui_desktop_font_family[80];
-int ro_gui_desktop_font_size = 12;
-rufl_style ro_gui_desktop_font_style = rufl_WEIGHT_400;
-
-
 static void nsfont_check_option(char **option, const char *family,
 		const char *fallback);
 static int nsfont_list_cmp(const void *keyval, const void *datum);
 static void nsfont_check_fonts(void);
 static void ro_gui_wimp_desktop_font(char *family, size_t bufsize, int *psize,
 		rufl_style *pstyle);
-
+static bool nsfont_width(const struct css_style *style,
+		const char *string, size_t length,
+		int *width);
+static bool nsfont_position_in_string(const struct css_style *style,
+		const char *string, size_t length,
+		int x, size_t *char_offset, int *actual_x);
+static bool nsfont_split(const struct css_style *style,
+		const char *string, size_t length,
+		int x, size_t *char_offset, int *actual_x);
+
+/** desktop font, size and style being used */
+char ro_gui_desktop_font_family[80];
+int ro_gui_desktop_font_size = 12;
+rufl_style ro_gui_desktop_font_style = rufl_WEIGHT_400;
+
+const struct font_functions nsfont = {
+	nsfont_width,
+	nsfont_position_in_string,
+	nsfont_split
+};
 
 /**
  * Initialize font handling.




More information about the netsurf-commits mailing list