Immediate-Mode-UI / Immediate-Mode-UI/Nuklear
layout auto-height not compatible with wrap functions when font size too big
- Dominant language
- C
- Stars
- 11.4k
- Forks
- 686
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 3
Description
I might be missing something, but when I bake a font with size >14 and the text is wrapped, a layout with height 0, which should dinamically increase its height, does not correctly take the wrapping into account, I need to set the layout height to a higher value in order for the wrapped text to appear.
To reproduce, just grab the glfw3 opengl 4 demo (the one I'm using), bake a custom font with a size 20 for example, and draw a text big enough to be wrapped.
```c
nk_layout_row_static(ctx, 0, width, 1);
nk_label_wrap(ctx,"qwkdqklwdkqldklqldkqkldqlkdqlkdklwqkdlqkldqkl");
```
Contributor guide
Research direction
Reproduce the issue in the glfw3 OpenGL 4 demo using a custom font of size 20, a zero-height static layout, and nk_label_wrap with sufficiently long text. Trace how the layout height and wrapping are calculated, then verify that wrapped text appears without manually increasing the layout height.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100