Skip to content

[rtext] Font files .fnt can only be loaded by LoadFont(), not with LoadFontEx() and LoadFontFromMemory() #5856

@Farbs

Description

@Farbs

Issue description

I was trying to load BMFont / Angelcode .fnt files using LoadFontEx, however it silently failed and returned the default font. Looking at the code for LoadFontEx, it seems that neither it nor LoadFontFromMemory have a pathway through to LoadBMFont, and that only LoadFont supports it.

I've added a note to the Using BMFonts page in the wiki in case it saves anyone else a bit of time.

Environment

Desktop, Windows 10, OpenGL 3.3, GTX1060

Code Example

Font doesNotWork = LoadFontEx("example.fnt", 32, NULL, 0);
Font works = LoadFont("example.fnt");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions