Use DPF built-in dejavu sans font as default
This allows to display text even with resources not available Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
a872013f90
commit
9b9d8f6d4d
1 changed files with 10 additions and 1 deletions
|
|
@ -140,7 +140,16 @@ void WindowInit(Window* const window, DISTRHO_NAMESPACE::UI* const ui)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Load default Blendish font
|
// Load default Blendish font
|
||||||
window->uiFont = window->loadFont(asset::system("res/fonts/DejaVuSans.ttf"));
|
#ifndef DGL_NO_SHARED_RESOURCES
|
||||||
|
ui->loadSharedResources();
|
||||||
|
window->uiFont = std::make_shared<Font>();
|
||||||
|
window->uiFont->vg = window->vg;
|
||||||
|
window->uiFont->handle = nvgFindFont(window->vg, NANOVG_DEJAVU_SANS_TTF);
|
||||||
|
window->internal->fontCache["res/fonts/DejaVuSans.ttf"] = window->uiFont;
|
||||||
|
#else
|
||||||
|
window->loadFont(asset::system("res/fonts/DejaVuSans.ttf"));
|
||||||
|
#endif
|
||||||
|
|
||||||
if (window->uiFont != nullptr)
|
if (window->uiFont != nullptr)
|
||||||
bndSetFont(window->uiFont->handle);
|
bndSetFont(window->uiFont->handle);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue