Open Omn1z opened 4 years ago
Hm, I don't know of any built-in way to have shadows. But it should be pretty easy to hack it together yourself (just take a copy of the rendered font, make the color a bit lighter and place the resulting bitmap with some tiny offset in both axes behind the original render). Will be a bit slower, but shouldn't be a big deal.
Outline on the other hand seems more about the font rendering backend which is just copy&pasted stb_truetype, so I'd ask there.
Though I have not tried it out myself, stb_truetype supports SDF character baking. SDF text rendering supports shadows and outline by default. Though something would need changing in your backend implementation to support this and the needed SDF shader.
However stb_truetype's SDF implementation only supports single channel SDF, which may change the appearance of your font by rounding or slicing off glyph corners. If I ever get around to it, I wanted to fuse the output of https://github.com/Chlumsky/msdfgen and Nuklear at some point.
I'm currently trying to add that feature
Currently trying to figure out how to add some padding to the rects so i could then apply some effects when baking
Any help or guidance is more than welcome
I ended up doing this: https://github.com/Immediate-Mode-UI/Nuklear/issues/698
shadows or outline