Immediate-Mode-UI / Immediate-Mode-UI/Nuklear
What compression does Nuklear use for fonts?
- Dominant language
- C
- Stars
- 11.4k
- Forks
- 686
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 3
Description
I want to add a font to my project by encoding it in base85 using the function `nk_font_atlas_add_compressed_base85`. Adding a base85 encoded ttf font in this way results in a segfault, when calling `nk_sdl_font_stash_end`, which I suppose is because I need to somehow compress the font before encoding it in base85.
Surprisingly this function does not have a non compressed counterpart. I found out it uses a function `nk_decompress` internally. How should I compress my font, so it can be decompressed using this function? There is no `nk_compress`.
Contributor guide
Research direction
Start by reading nk_font_atlas_add_compressed_base85 and nk_decompress, then trace the call from nk_sdl_font_stash_end that produces the segfault. Determine the compression format expected by nk_decompress and document how a font should be prepared, or clarify whether this API is unsupported without a corresponding compressor.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- frontend
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100