Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing #else implementation in fntGetFontAtlasSize() #304

Closed
sliptrixx opened this issue May 27, 2024 · 1 comment
Closed

Missing #else implementation in fntGetFontAtlasSize() #304

sliptrixx opened this issue May 27, 2024 · 1 comment

Comments

@sliptrixx
Copy link

The function int2 fntGetFontAtlasSize() in FontSystem.cpp is missing the alternate implementation when ENABLE_FORGE_FONTS is not defined.

Current Version:

int2 fntGetFontAtlasSize()
{
#ifdef ENABLE_FORGE_FONTS
    ASSERT(gFontstash.mRenderInitialized && "Font Rendering not initialized! Make sure to call initFontRendering!");

    int2         size = {};
    FONScontext* fs = gFontstash.pContext;
    fonsGetAtlasSize(fs, &size.x, &size.y);
    return size;
#endif
}

Expected Version:

int2 fntGetFontAtlasSize()
{
#ifdef ENABLE_FORGE_FONTS
    ASSERT(gFontstash.mRenderInitialized && "Font Rendering not initialized! Make sure to call initFontRendering!");

    int2         size = {};
    FONScontext* fs = gFontstash.pContext;
    fonsGetAtlasSize(fs, &size.x, &size.y);
    return size;
#else
    return int2(0);
#endif
}
@sliptrixx
Copy link
Author

Fixed as of Release 1.59. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant