Is it possible to use Font_BRepFont in wasm?

Hello.

Now I'm testing webgl build (emscripten wasm).

But It seems that there is no available font.

Font_FontMgr::GetInstance()->InitFontDataBase();
Font_NListOfSystemFont fontList = Font_FontMgr::GetInstance()->GetAvailableFonts();

printf("Start Listing..\n");
for (const auto& font : fontList) {
    printf("Available font: %s\n", font->FontName().ToCString()); // Nothing printed
}
printf("End Listing..\n");

How can I use the font functions in WebGL?

Kirill Gavrilov's picture

Browsers do not expose any font files to application, so you need to download your own fonts in compatible format (depends on FreeType build configuration) and register them within Font_FontMgr.