Skip to content

How to use dynamic atlas generation? #28

Answered by Chlumsky
SnackerB asked this question in Q&A
Discussion options

You must be logged in to vote

This is kind of an overlooked feature, I hadn't even noticed that because of some old leftover code it wasn't even compatible with the immediate generator, so I've fixed that now.

In any case, I believe the missing step is GlyphGeometry::wrapBox which is required to determine the actual resolution of the glyphs (and range). Sorry for not mentioning this anywhere. For MSDF, GlyphGeometry::edgeColoring is also something that the immediate generator doesn't do by itself. Here is an example that should work as of b5d54f3:

#include <msdf-atlas-gen/msdf-atlas-gen.h>

using namespace msdf_atlas;

int main() {
    msdfgen::FreetypeHandle *ft = msdfgen::initializeFreetype();
    msdfgen::FontHandl…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@SnackerB
Comment options

Answer selected by SnackerB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants