3 ms·
He speaks about the 60 FPS when he tried NanoVG... I think he did not realize he could do that trick with IMGUI. For text rendering with Nuklear, you make a fon
by FraKtus 7y ago
He speaks about the 60 FPS when he tried NanoVG... I think he did not realize he could do that trick with IMGUI.
For text rendering with Nuklear, you make a font atlas from a true type font, rasterizing the font is built in Nuklear with stb_truetype. That gives you a lot of freedom. You can load as many fonts as you need. There is also support to load a binary resource such as the TTF file from a base85 string; it's very handy.
For layout it's immediate mode, so you describe it with code such as
nk_layout_row_dynamic(ctx, (float) row_height, 3); // a row of 3 buttons
if (nk_button_label(ctx, "Previous"))
...
if (nk_button_label(ctx, "Next"))
...
Here is small app I made with Nuklear:
https://www.youtube.com/watch?v=MycIYcutlMA https://www.youtube.com/watch?v=MycIYcutlMA