Hi
I found many aspects of the CppCon 2019 graphics presentation interesting. I have played with sdf based text rendering and was interesting in testing it with the multi-channel sdf approach...so now you have done it for me!
You focused on the advantages of the multi-channel approach for sharp corners on large fonts. However, I had found in the past that sdf quality also had problems on smaller sizes. High DPI is certainly a concern...but we need/expect good quality for small/normal sizes/non-high-dpi as well. I wanted to play with this in CsPaint but I wasn't able to get a build working quickly on windows due to the dependencies. Can you post a screen shot? Similarly rotated text might be problematic at small/typical sizes.
Here are some other resources you might find interesting:
* Glyphy
** https://github.com/behdad/glyphy, which is by the same guy who does harfbuzz
* https://medium.com/@evanwallace/easy-scalable-text-rendering-on-the-gpu-c3f4d782c5ac
* https://wdobbie.com/post/gpu-text-rendering-with-vector-textures/
* http://jcgt.org/published/0006/02/02/
** This was commercialed into Slug, https://sluglibrary.com/
Regarding your plans to basically use a vulkan backend as the solution to high-dpi, i wonder how you will handle various design elements on scaling. For example, if you have a line which is 1 pixel wide, and then you scale to 1.5, the line will look blurry...so something more nuanced than a naive scaling may be required in some circumstances.
CsPaint questions
Re: CsPaint questions
I tested CsPaint on Windows, was there a particular dependency you could not find or had issues installing?I wanted to play with this in CsPaint but I wasn't able to get a build working quickly on windows due to the dependencies
Can you let us know what you are looking for?Can you post a screen shot?
We are using Harfbuzz and have worked with Behdad, he is a wonderful person. Glyphy appears to be similar to our approach, however with our multi channel SDF shaders we have more accurate results than the standard SDF.
Slug is a commercial product which makes it unusable for an open source project. This product does not use SDF but evaluates the Bezier curves in a fragment shader. Not a bad approach however it can be very slow.
In terms of using Vulkan for rendering in CopperSpice, the items you mentioned maybe a concern. However, our approach will be much better than current GUI 2D approaches. These may need to be handled on a per case basis but simply having a user interface which scales properly at non integer scaling factors is fantastic progress.
Thanks for your interest in CsPaint and we look forward to a continued discussion.
Barbara
Re: CsPaint questions
Screenshots of your solution rendering fonts at typical/small sizes.Can you let us know what you are looking for?
Glyphy is not using regular sdfs...it approximates glyph outlines using circular arcs which is then encoded. It thus suffers no issues from the sampling nature of a texture based sdf. I'm not saying it's the correct solution for you, but thought you'd like to be aware.
Yes slug is commercial, but i linked to the paper/code on which it is based...which is open source (not sure the license however).
My build issues i suppose stemmed from having Cmake find the libraries. It's not really a problem with your build system...it just, unfortunately, the typical case of PITA dependency management in C++ where you have to spend 30-60 mins just to check out a tool...which is why i suggested vcpkg support in another thread. I wasn't trying to say you have a problem there...just explaining why i wanted you to create a screenshot instead of creating it myself, which of course is more ideal.