memononen / nanovg

Antialiased 2D vector drawing library on top of OpenGL for UI and visualizations.
zlib License
5.06k stars 767 forks source link

Font Dilation (font outline) #640

Open rgb2hsv opened 1 year ago

rgb2hsv commented 1 year ago

This PR adds font dilation as nvgFontDilate() to give better emphasis to text, especially when it is overlaid on an unknown background color or image. It is implemented with gray level morphology, which is approximated with directional convolutions. It can also be used in combination with nvgFontBlur() for a smoother fall-off. dump

fwsGonzo commented 2 months ago

Fantastic work! Thanks for doing this.