Skip to content

Commit

Permalink
Add NK_FONT_BAKING_SKIP_STB_IMPLEMENTATION
Browse files Browse the repository at this point in the history
  • Loading branch information
RobLoach committed Oct 6, 2023
1 parent a14e55f commit deb0fc6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nuklear.h
Original file line number Diff line number Diff line change
Expand Up @@ -6090,8 +6090,15 @@ NK_LIB void nk_property(struct nk_context *ctx, const char *name, struct nk_prop

#ifdef NK_INCLUDE_FONT_BAKING

/**
* NK_FONT_BAKING_SKIP_STB_IMPLEMENTATION
*
* Allows skipping defining STB_RECT_PACK_IMPLEMENTATION and STB_TRUETYPE_IMPLEMENTATION.
*/
#ifndef NK_FONT_BAKING_SKIP_STB_IMPLEMENTATION
#define STB_RECT_PACK_IMPLEMENTATION
#define STB_TRUETYPE_IMPLEMENTATION
#endif /* NK_FONT_BAKING_SKIP_STB_IMPLEMENTATION */

/* Allow consumer to define own STBTT_malloc/STBTT_free, and use the font atlas' allocator otherwise */
#ifndef STBTT_malloc
Expand Down
7 changes: 7 additions & 0 deletions src/nuklear_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,15 @@ NK_LIB void nk_property(struct nk_context *ctx, const char *name, struct nk_prop

#ifdef NK_INCLUDE_FONT_BAKING

/**
* NK_FONT_BAKING_SKIP_STB_IMPLEMENTATION
*
* Allows skipping defining STB_RECT_PACK_IMPLEMENTATION and STB_TRUETYPE_IMPLEMENTATION.
*/
#ifndef NK_FONT_BAKING_SKIP_STB_IMPLEMENTATION
#define STB_RECT_PACK_IMPLEMENTATION
#define STB_TRUETYPE_IMPLEMENTATION
#endif /* NK_FONT_BAKING_SKIP_STB_IMPLEMENTATION */

/* Allow consumer to define own STBTT_malloc/STBTT_free, and use the font atlas' allocator otherwise */
#ifndef STBTT_malloc
Expand Down

0 comments on commit deb0fc6

Please sign in to comment.