memononen / nanovg

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

Pass fringe parameter to renderTriangles #561

Closed olilarkin closed 4 years ago

olilarkin commented 4 years ago

fixes bad clipping of text on high DPI screens

Here is an example of the results we are getting without this fix, the text is clipped to control bounds with nvgscissor, but if the text goes outside the bounds we get some artifacts at the edges on retina screens. On low-DPI screens there are no such artifacts.

nvgfringe

olilarkin commented 4 years ago

@olliwang we also needed to update this in MetalNanoVG, will do a PR there too

memononen commented 4 years ago

Thanks for the fix!