-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any way to set font for individual widgets or windows? #104
Comments
Possibly could accomplish having different color styles by having a pointer to a style for each widget, and apply it to the Nuklear styles when rendering. Not sure how to have different fonts displayed in the same context though. Have you done this before? |
Yes. You can push/pop fonts in Nuklear, (nk_style_push/pop_font) I've used it in my own menus before. For example, to use different fonts for the title and menu itself. Like so: (It's meant to mimic the look of the original Terminal Velocity menu, but a bit more streamlined) Another way is to use nk_style_set_font, which sets it directly, but clears the push/pop stack. |
Looks great! Does look like the original. Something like this should allow setting a different font on a per-widget basis, but I'm unsure it's the best design. Also, would love a demonstration of using them in the demos #107 |
I mean, that would do the trick. Looks good to me, but I'm also no expert so I can't really judge the design. There's also nk_style_push/pop_style_item, which would let you set style stuff in general per-widget. Dunno how best you'd write an API for that in nuklear_console, but might be something worth considering. |
Just wondering if there's a way to set the font for individual widgets in a window, or for a whole window, and if not, is it alright if I request this as a feature?
The text was updated successfully, but these errors were encountered: