diff options
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r-- | source/blender/blenfont/BLF_api.h | 4 | ||||
-rw-r--r-- | source/blender/blenfont/intern/blf.c | 4 | ||||
-rw-r--r-- | source/blender/blenfont/intern/blf_font.c | 4 | ||||
-rw-r--r-- | source/blender/blenfont/intern/blf_internal.h | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h index 18932ffdac8..364d5f90af3 100644 --- a/source/blender/blenfont/BLF_api.h +++ b/source/blender/blenfont/BLF_api.h @@ -40,10 +40,10 @@ void BLF_exit(void); void BLF_cache_clear(void); int BLF_load(const char *name); -int BLF_load_mem(const char *name, unsigned char *mem, int mem_size); +int BLF_load_mem(const char *name, const unsigned char *mem, int mem_size); int BLF_load_unique(const char *name); -int BLF_load_mem_unique(const char *name, unsigned char *mem, int mem_size); +int BLF_load_mem_unique(const char *name, const unsigned char *mem, int mem_size); void BLF_unload(const char *name); diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c index 70794a11ff2..683ef3f821c 100644 --- a/source/blender/blenfont/intern/blf.c +++ b/source/blender/blenfont/intern/blf.c @@ -227,7 +227,7 @@ void BLF_metrics_attach(int fontid, unsigned char *mem, int mem_size) } } -int BLF_load_mem(const char *name, unsigned char *mem, int mem_size) +int BLF_load_mem(const char *name, const unsigned char *mem, int mem_size) { FontBLF *font; int i; @@ -262,7 +262,7 @@ int BLF_load_mem(const char *name, unsigned char *mem, int mem_size) return i; } -int BLF_load_mem_unique(const char *name, unsigned char *mem, int mem_size) +int BLF_load_mem_unique(const char *name, const unsigned char *mem, int mem_size) { FontBLF *font; int i; diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c index 6ab942f4e4d..945565e22a9 100644 --- a/source/blender/blenfont/intern/blf_font.c +++ b/source/blender/blenfont/intern/blf_font.c @@ -560,12 +560,12 @@ void blf_font_attach_from_mem(FontBLF *font, const unsigned char *mem, int mem_s FT_Open_Args open; open.flags = FT_OPEN_MEMORY; - open.memory_base = (FT_Byte *)mem; + open.memory_base = (const FT_Byte *)mem; open.memory_size = mem_size; FT_Attach_Stream(font->face, &open); } -FontBLF *blf_font_new_from_mem(const char *name, unsigned char *mem, int mem_size) +FontBLF *blf_font_new_from_mem(const char *name, const unsigned char *mem, int mem_size) { FontBLF *font; FT_Error err; diff --git a/source/blender/blenfont/intern/blf_internal.h b/source/blender/blenfont/intern/blf_internal.h index f43fa8a7458..ba66fce8374 100644 --- a/source/blender/blenfont/intern/blf_internal.h +++ b/source/blender/blenfont/intern/blf_internal.h @@ -47,7 +47,7 @@ int blf_font_init(void); void blf_font_exit(void); struct FontBLF *blf_font_new(const char *name, const char *filename); -struct FontBLF *blf_font_new_from_mem(const char *name, unsigned char *mem, int mem_size); +struct FontBLF *blf_font_new_from_mem(const char *name, const unsigned char *mem, int mem_size); void blf_font_attach_from_mem(struct FontBLF *font, const unsigned char *mem, int mem_size); void blf_font_size(struct FontBLF *font, int size, int dpi); |