Open rougier opened 8 years ago
I think we should merge freetype-gl, GLyphy, and msdfgen into a unified library that exposes a sane API while allowing for different algorithms, as well as mix-and-matching them based on size, etc. Unfortunately, I don't have much time right now but, any volunteer ? :)
Yes, that would be awesome !
I'd really like that integration.
One major difference in how GLyphy is implemented vs the other two, is that GLyphy does it's font processing online, on a per-glyph basis, whereas freetype-gl and msdfgen preprocess the font, as far as I understand? If we can find a good atlas implementation, we can start merging the three approaches.
Freetype-gl also processes on a per-glyph basis and on demand. For the atlas, I use the Skyline Bottom-Left algorithm (from Jylänki, J., 2010. A Thousand Ways to Pack the Bin - A Practical Approach to Two-Dimensional Rectangle Bin Packing. http://clb.demon.fi/files/ RectangleBinPack.pdf)
msdf might confuse the atlas algorithm, I would think, but it's probably the most desired format.
msdf might confuse the atlas algorithm, I would think, but it's probably the most desired format.
Why? If anything, glyphy will confuse atlases as it's storing one-dimensional binary data, not an image whatsoever...
Freetype-gl also processes on a per-glyph basis and on demand. For the atlas, I use the Skyline Bottom-Left algorithm (from Jylänki, J., 2010. A Thousand Ways to Pack the Bin - A Practical Approach to Two-Dimensional Rectangle Bin Packing. http://clb.demon.fi/files/ RectangleBinPack.pdf)
Cool. Thanks. I looked at msdf and the core of the algorithm looks very simple and should not be a lot of work to integrate into freetype-gl.
msdfgen is GPL
Ok, now, it's not: https://github.com/Chlumsky/msdfgen/issues/4#issuecomment-217719668 :smile:
I think we should merge freetype-gl, GLyphy, and msdfgen into a unified library that exposes a sane API while allowing for different algorithms, as well as mix-and-matching them based on size, etc. Unfortunately, I don't have much time right now but, any volunteer ? :)
For starters the projects could be moved into a common organization. Any ideas for a new project name?
For starters the projects could be moved into a common organization. Any ideas for a new project name?
That can always be done later ;)
+1
It would be nice to adapt the multichannel SDF (https://github.com/Chlumsky/msdfgen) into freetype-gl. Unfortunately, I don't have much time right now but, any volunteer ?