summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-05-12 09:31:40 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-05-12 09:31:40 +0000
commitd6dbfef4520475a5275e0bc84c917dbb06724b54 (patch)
tree81268860f1b8bbad3fdaa32a3bc7cc8324ca0d1d /apps
parent35fd1e4e9933cc3d448cd6415f43f42f0289cd61 (diff)
downloadrockbox-d6dbfef4520475a5275e0bc84c917dbb06724b54.tar.gz
rockbox-d6dbfef4520475a5275e0bc84c917dbb06724b54.tar.bz2
rockbox-d6dbfef4520475a5275e0bc84c917dbb06724b54.zip
Borrow another 10K to make sure multifont will have room on even the smallerst screens
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25962 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/gui/skin_engine/skin_buffer.c3
-rw-r--r--apps/gui/skin_engine/skin_fonts.c6
-rw-r--r--apps/gui/skin_engine/skin_fonts.h3
3 files changed, 7 insertions, 5 deletions
diff --git a/apps/gui/skin_engine/skin_buffer.c b/apps/gui/skin_engine/skin_buffer.c
index a15ad10bee..d503b83e42 100644
--- a/apps/gui/skin_engine/skin_buffer.c
+++ b/apps/gui/skin_engine/skin_buffer.c
@@ -31,6 +31,7 @@
#include "wps_internals.h"
#include "skin_tokens.h"
#include "skin_buffer.h"
+#include "skin_fonts.h"
/* skin buffer management.
* This module is used to allocate space in a single global skin buffer for
@@ -66,7 +67,7 @@
#endif
-#define SKIN_BUFFER_SIZE (MAIN_BUFFER + REMOTE_BUFFER) + \
+#define SKIN_BUFFER_SIZE (MAIN_BUFFER + REMOTE_BUFFER + SKIN_FONT_SIZE) + \
(WPS_MAX_TOKENS * sizeof(struct wps_token))
#endif
diff --git a/apps/gui/skin_engine/skin_fonts.c b/apps/gui/skin_engine/skin_fonts.c
index 2db5ef2ec2..f446a9948b 100644
--- a/apps/gui/skin_engine/skin_fonts.c
+++ b/apps/gui/skin_engine/skin_fonts.c
@@ -29,8 +29,6 @@
#include "font.h"
#include "skin_buffer.h"
#include "skin_fonts.h"
-#define FONT_SIZE 10000
-
static struct skin_font_info {
struct font font;
@@ -90,7 +88,7 @@ int skin_font_load(char* font_name)
pf = &font->font;
if (!font->buffer)
{
- pf->buffer_start = skin_buffer_alloc(FONT_SIZE);
+ pf->buffer_start = skin_buffer_alloc(SKIN_FONT_SIZE);
if (!pf->buffer_start)
return -1;
font->buffer = pf->buffer_start;
@@ -99,7 +97,7 @@ int skin_font_load(char* font_name)
{
pf->buffer_start = font->buffer;
}
- pf->buffer_size = FONT_SIZE;
+ pf->buffer_size = SKIN_FONT_SIZE;
snprintf(filename, MAX_PATH, FONT_DIR "/%s.fnt", font_name);
strcpy(font->name, font_name);
diff --git a/apps/gui/skin_engine/skin_fonts.h b/apps/gui/skin_engine/skin_fonts.h
index 778be0a73a..18aa885711 100644
--- a/apps/gui/skin_engine/skin_fonts.h
+++ b/apps/gui/skin_engine/skin_fonts.h
@@ -33,6 +33,9 @@
#define _SKINFONTS_H_
+#define SKIN_FONT_SIZE 10000
+
+
void skin_font_init(void);
/* load a font into the skin buffer. return the font id. */