diff options
-rw-r--r-- | apps/gui/skin_engine/skin_buffer.c | 3 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_fonts.c | 6 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_fonts.h | 3 |
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. */ |