Skip to content

Conversation

@DongkunLee
Copy link
Contributor

I want Bitmap Font loader is extended.
This code can load multiple atlas.

I wish may it could be helpful to raylib.

@RobLoach
Copy link
Contributor

Looks pretty cool. Have been curious about .bmf myself. Looks to bring in a third-party library? Perhaps it could live as an external library quite well... call if raylib-bmfont or something :)

@raysan5
Copy link
Owner

raysan5 commented Nov 13, 2023

@RobLoach Actually it adds support for multi-atlas .fnt xml files, generated using Angel Code BMFont tool. Afair, it was the first font loader implemented in raylib about 10 years ago for bitmap font atlas but only 1 image-atlas was supported. This PR should only address that issue, modifying the LoadBMFont() functions in rtext.c. Afaik, .BMF files are a completely different thing.

@RobLoach
Copy link
Contributor

Oh nice! That sounds really cool.

@raysan5
Copy link
Owner

raysan5 commented Dec 1, 2023

@DongkunLee The following file should be removed from the PR to be able to be merged: loadbmfontex.diff

@raysan5
Copy link
Owner

raysan5 commented Dec 11, 2023

@DongkunLee Please, could you remove the loadbmfontex.diff file from the PR to merge?

Rectangle srcRec = { 0.0f, 0.0f, (float)imWidth, (float)imHeight };
Rectangle destRec = { 0.0f, (float)imHeight*(float)i, (float)imWidth, (float)imHeight };
ImageDraw(&fullFont, imFonts[i], srcRec, destRec, WHITE);
}

Check failure

Code scanning / CodeQL

Overflow in uncontrolled allocation size

This allocation size is derived from [user input (string read by fread)](1) and might overflow.
@raysan5
Copy link
Owner

raysan5 commented Dec 15, 2023

Just reviewed the PR for merging but please note this is not the expected way to contribute to a project. The contributor must ensure the PR is correct and become the owner of its contributions.

@raysan5 raysan5 merged commit 9de7986 into raysan5:master Dec 15, 2023
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

Successfully merging this pull request may close these issues.

3 participants