diff options
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r-- | source/blender/blenfont/BLF_api.h | 5 | ||||
-rw-r--r-- | source/blender/blenfont/intern/blf_font.c | 4 | ||||
-rw-r--r-- | source/blender/blenfont/intern/blf_internal.h | 5 | ||||
-rw-r--r-- | source/blender/blenfont/intern/blf_internal_types.h | 5 |
4 files changed, 6 insertions, 13 deletions
diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h index 1d0cb2f524c..9013836fd1e 100644 --- a/source/blender/blenfont/BLF_api.h +++ b/source/blender/blenfont/BLF_api.h @@ -21,8 +21,7 @@ * \ingroup blf */ -#ifndef __BLF_API_H__ -#define __BLF_API_H__ +#pragma once #include "BLI_compiler_attrs.h" #include "BLI_sys_types.h" @@ -305,5 +304,3 @@ struct ResultBLF { #ifdef __cplusplus } #endif - -#endif /* __BLF_API_H__ */ diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c index da6224cff7f..ff31878a929 100644 --- a/source/blender/blenfont/intern/blf_font.c +++ b/source/blender/blenfont/intern/blf_font.c @@ -194,6 +194,8 @@ static GPUTexture *blf_batch_cache_texture_load(void) int offset_x = bitmap_len_landed % tex_width; int offset_y = bitmap_len_landed / tex_width; + GPU_texture_bind(gc->texture, 0); + /* TODO(germano): Update more than one row in a single call. */ while (remain) { int remain_row = tex_width - offset_x; @@ -297,7 +299,7 @@ void blf_font_size(FontBLF *font, unsigned int size, unsigned int dpi) } } - err = FT_Set_Char_Size(font->face, 0, (FT_F26Dot6)(size * 64), dpi, dpi); + err = FT_Set_Char_Size(font->face, 0, ((FT_F26Dot6)(size)) * 64, dpi, dpi); if (err) { /* FIXME: here we can go through the fixed size and choice a close one */ printf("The current font don't support the size, %u and dpi, %u\n", size, dpi); diff --git a/source/blender/blenfont/intern/blf_internal.h b/source/blender/blenfont/intern/blf_internal.h index 4ae592d323f..ba0873f4fd4 100644 --- a/source/blender/blenfont/intern/blf_internal.h +++ b/source/blender/blenfont/intern/blf_internal.h @@ -21,8 +21,7 @@ * \ingroup blf */ -#ifndef __BLF_INTERNAL_H__ -#define __BLF_INTERNAL_H__ +#pragma once struct FontBLF; struct GlyphBLF; @@ -151,5 +150,3 @@ extern FT_Error FT_New_Face__win32_compat(FT_Library library, FT_Face *aface); # endif #endif - -#endif /* __BLF_INTERNAL_H__ */ diff --git a/source/blender/blenfont/intern/blf_internal_types.h b/source/blender/blenfont/intern/blf_internal_types.h index 34b674670fd..36bb8769306 100644 --- a/source/blender/blenfont/intern/blf_internal_types.h +++ b/source/blender/blenfont/intern/blf_internal_types.h @@ -21,8 +21,7 @@ * \ingroup blf */ -#ifndef __BLF_INTERNAL_TYPES_H__ -#define __BLF_INTERNAL_TYPES_H__ +#pragma once #include "GPU_texture.h" #include "GPU_vertex_buffer.h" @@ -258,5 +257,3 @@ typedef struct DirBLF { /* full path where search fonts. */ char *path; } DirBLF; - -#endif /* __BLF_INTERNAL_TYPES_H__ */ |