[Bf-blender-cvs] [36653a92fad] master: Cleanup: centralize BLF default functions in the header

Campbell Barton noreply at git.blender.org
Thu Oct 22 08:31:58 CEST 2020


Commit: 36653a92fad456e5ff99573ab82adaa1fca4a273
Author: Campbell Barton
Date:   Thu Oct 22 17:30:52 2020 +1100
Branches: master
https://developer.blender.org/rB36653a92fad456e5ff99573ab82adaa1fca4a273

Cleanup: centralize BLF default functions in the header

===================================================================

M	source/blender/blenfont/BLF_api.h
M	source/blender/blenfont/intern/blf_default.c

===================================================================

diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h
index bf84f5c57b3..03877957f42 100644
--- a/source/blender/blenfont/BLF_api.h
+++ b/source/blender/blenfont/BLF_api.h
@@ -40,9 +40,6 @@ struct rcti;
 
 int BLF_init(void);
 void BLF_exit(void);
-void BLF_default_dpi(int dpi);
-void BLF_default_set(int fontid);
-int BLF_default(void); /* get default font ID so we can pass it to other functions */
 
 void BLF_cache_clear(void);
 
@@ -98,13 +95,6 @@ void BLF_batch_draw_begin(void);
 void BLF_batch_draw_flush(void);
 void BLF_batch_draw_end(void);
 
-/* Draw the string using the default font, size and dpi. */
-void BLF_draw_default(float x, float y, float z, const char *str, size_t len) ATTR_NONNULL();
-void BLF_draw_default_ascii(float x, float y, float z, const char *str, size_t len) ATTR_NONNULL();
-
-/* Set size and DPI, and return default font ID. */
-int BLF_set_default(void);
-
 /* Draw the string using the current font. */
 void BLF_draw_ex(int fontid, const char *str, size_t len, struct ResultBLF *r_info)
     ATTR_NONNULL(2);
@@ -257,6 +247,16 @@ void BLF_thumb_preview(const char *filename,
                        int h,
                        int channels) ATTR_NONNULL();
 
+/* blf_default.c */
+void BLF_default_dpi(int dpi);
+void BLF_default_set(int fontid);
+int BLF_default(void); /* get default font ID so we can pass it to other functions */
+/* Draw the string using the default font, size and dpi. */
+void BLF_draw_default(float x, float y, float z, const char *str, size_t len) ATTR_NONNULL();
+void BLF_draw_default_ascii(float x, float y, float z, const char *str, size_t len) ATTR_NONNULL();
+/* Set size and DPI, and return default font ID. */
+int BLF_set_default(void);
+
 /* blf_font_default.c */
 int BLF_load_default(const bool unique);
 int BLF_load_mono_default(const bool unique);
diff --git a/source/blender/blenfont/intern/blf_default.c b/source/blender/blenfont/intern/blf_default.c
index bd06f14800c..7bbc865128d 100644
--- a/source/blender/blenfont/intern/blf_default.c
+++ b/source/blender/blenfont/intern/blf_default.c
@@ -23,11 +23,6 @@
  * Default API, that uses Blender's user preferences for the default size.
  */
 
-#include <ft2build.h>
-
-#include FT_FREETYPE_H
-#include FT_GLYPH_H
-
 #include "DNA_userdef_types.h"
 
 #include "BLI_assert.h"



More information about the Bf-blender-cvs mailing list