diff --git a/nuklear.h b/nuklear.h index a3b82fae8..c2edb75a0 100644 --- a/nuklear.h +++ b/nuklear.h @@ -6103,8 +6103,23 @@ NK_LIB void nk_property(struct nk_context *ctx, const char *name, struct nk_prop #ifdef NK_INCLUDE_FONT_BAKING +/** + * @def NK_NO_STB_RECT_PACK_IMPLEMENTATION + * + * When defined, will avoid enabling STB_RECT_PACK_IMPLEMENTATION for when stb_rect_pack.h is already implemented elsewhere. + */ +#ifndef NK_NO_STB_RECT_PACK_IMPLEMENTATION #define STB_RECT_PACK_IMPLEMENTATION +#endif /* NK_NO_STB_RECT_PACK_IMPLEMENTATION */ + +/** + * @def NK_NO_STB_TRUETYPE_IMPLEMENTATION + * + * When defined, will avoid enabling STB_TRUETYPE_IMPLEMENTATION for when stb_truetype.h is already implemented elsewhere. + */ +#ifndef NK_NO_STB_TRUETYPE_IMPLEMENTATION #define STB_TRUETYPE_IMPLEMENTATION +#endif /* NK_NO_STB_TRUETYPE_IMPLEMENTATION */ /* Allow consumer to define own STBTT_malloc/STBTT_free, and use the font atlas' allocator otherwise */ #ifndef STBTT_malloc diff --git a/src/nuklear_internal.h b/src/nuklear_internal.h index 8d1b785b9..4f71f30bd 100644 --- a/src/nuklear_internal.h +++ b/src/nuklear_internal.h @@ -328,8 +328,23 @@ NK_LIB void nk_property(struct nk_context *ctx, const char *name, struct nk_prop #ifdef NK_INCLUDE_FONT_BAKING +/** + * @def NK_NO_STB_RECT_PACK_IMPLEMENTATION + * + * When defined, will avoid enabling STB_RECT_PACK_IMPLEMENTATION for when stb_rect_pack.h is already implemented elsewhere. + */ +#ifndef NK_NO_STB_RECT_PACK_IMPLEMENTATION #define STB_RECT_PACK_IMPLEMENTATION +#endif /* NK_NO_STB_RECT_PACK_IMPLEMENTATION */ + +/** + * @def NK_NO_STB_TRUETYPE_IMPLEMENTATION + * + * When defined, will avoid enabling STB_TRUETYPE_IMPLEMENTATION for when stb_truetype.h is already implemented elsewhere. + */ +#ifndef NK_NO_STB_TRUETYPE_IMPLEMENTATION #define STB_TRUETYPE_IMPLEMENTATION +#endif /* NK_NO_STB_TRUETYPE_IMPLEMENTATION */ /* Allow consumer to define own STBTT_malloc/STBTT_free, and use the font atlas' allocator otherwise */ #ifndef STBTT_malloc