Skip to content

How to use as a library? #18

Answered by Chlumsky
smolck asked this question in Q&A
Jun 1, 2021 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

My goal was to make the library portion as flexible as possible so that it can be used in many different ways, such as - the way it's used in the standalone executable, to progressively generate requested characters on the fly in the background, to work in a GPU accelerated context or not, etc. Because of that, it is nowhere as simple as generateEverything("myfont.ttf"); and done. What use case do you have in mind?

I can try to describe what roughly happens in the main.cpp, starting about here. Keep in mind there is a lot of extra code because of all the different settings and error reporting.

  1. Acquire font handle (msdfgen::FontHandle *) using msdfgen::loadFont (after initializing msdfgen…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@smolck
Comment options

@Chlumsky
Comment options

@smolck
Comment options

Answer selected by smolck
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