summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
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 @@
31#include "wps_internals.h" 31#include "wps_internals.h"
32#include "skin_tokens.h" 32#include "skin_tokens.h"
33#include "skin_buffer.h" 33#include "skin_buffer.h"
34#include "skin_fonts.h"
34 35
35/* skin buffer management. 36/* skin buffer management.
36 * This module is used to allocate space in a single global skin buffer for 37 * This module is used to allocate space in a single global skin buffer for
@@ -66,7 +67,7 @@
66#endif 67#endif
67 68
68 69
69#define SKIN_BUFFER_SIZE (MAIN_BUFFER + REMOTE_BUFFER) + \ 70#define SKIN_BUFFER_SIZE (MAIN_BUFFER + REMOTE_BUFFER + SKIN_FONT_SIZE) + \
70 (WPS_MAX_TOKENS * sizeof(struct wps_token)) 71 (WPS_MAX_TOKENS * sizeof(struct wps_token))
71#endif 72#endif
72 73
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 @@
29#include "font.h" 29#include "font.h"
30#include "skin_buffer.h" 30#include "skin_buffer.h"
31#include "skin_fonts.h" 31#include "skin_fonts.h"
32#define FONT_SIZE 10000
33
34 32
35static struct skin_font_info { 33static struct skin_font_info {
36 struct font font; 34 struct font font;
@@ -90,7 +88,7 @@ int skin_font_load(char* font_name)
90 pf = &font->font; 88 pf = &font->font;
91 if (!font->buffer) 89 if (!font->buffer)
92 { 90 {
93 pf->buffer_start = skin_buffer_alloc(FONT_SIZE); 91 pf->buffer_start = skin_buffer_alloc(SKIN_FONT_SIZE);
94 if (!pf->buffer_start) 92 if (!pf->buffer_start)
95 return -1; 93 return -1;
96 font->buffer = pf->buffer_start; 94 font->buffer = pf->buffer_start;
@@ -99,7 +97,7 @@ int skin_font_load(char* font_name)
99 { 97 {
100 pf->buffer_start = font->buffer; 98 pf->buffer_start = font->buffer;
101 } 99 }
102 pf->buffer_size = FONT_SIZE; 100 pf->buffer_size = SKIN_FONT_SIZE;
103 101
104 snprintf(filename, MAX_PATH, FONT_DIR "/%s.fnt", font_name); 102 snprintf(filename, MAX_PATH, FONT_DIR "/%s.fnt", font_name);
105 strcpy(font->name, font_name); 103 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 @@
33#define _SKINFONTS_H_ 33#define _SKINFONTS_H_
34 34
35 35
36#define SKIN_FONT_SIZE 10000
37
38
36void skin_font_init(void); 39void skin_font_init(void);
37 40
38/* load a font into the skin buffer. return the font id. */ 41/* load a font into the skin buffer. return the font id. */