nanovg
nanovg copied to clipboard
Antialiased 2D vector drawing library on top of OpenGL for UI and visualizations.
I needed an option to center text vertically based on the cap height only. When choosing **NVG_ALIGN_MIDDLE**, the ascender and the descender are taken into account, so a string containing...
Font stash returns glyph positions in integer pixels. When rendering text at floating point positions, glyph positions get rounded to the nearest pixel. This is particularly noticeable with animated moving...
This can avoid unneccessary rasterization. (see #643) In one demo, where I am using glyph measurements quite a lot, I could get 360fps instead of 330fps with this change. I...
The layout and drawing code of nanovg uses `fonsTextIterInit` and `fonsTextIterNext` to step through the glyphs. `fonsTextIterInit` needs to adjust the coordinates for the given origin and alignment (like `NVG_ALIGN_CENTER`)....
nanovg uses the `FONS_GLYPH_BITMAP_OPTIONAL` flag in various places to avoid the creation of superflous font atlas entries for glyphs. The actual glyph information is queried by [`fons__tt_buildGlyphBitmap` ](https://github.com/memononen/nanovg/blob/397f3300bc14bdb856ec429c71c345ab0340b0a6/src/fontstash.h#L347), which always...
That's it.
This PR adds different line styles by generating uv textures along stroke paths and then applying a shading style. Extra vertices are inserted so that the UV distortion occurs only...
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...
My idea to fix issue #631 is to have a list for vaos (like how textures are handled) that is updated each frame and a new vao is created when...
Hi, i can't figure out why nanovg_gl.h contains both definitions and declarations together, if i want to use nvgCreateGLES2 on multiple files so i have to include nanovg_gl.h (with -DNANOVG_GLES2_IMPLEMENTATION)...