-
Notifications
You must be signed in to change notification settings - Fork 19
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
Raylib.load_font segfaults #32
Comments
Thanks for the issue, however this appears to be an issue with raylib directly rather than my binding, can you attempt to reproduce this with C? |
Yeah, I'm currently using the same C Raylib apis directly in my other application. I cannot reproduce. |
Can you upload the TTF file? I use this in a project and it is still working last I checked. |
Absolutely. Attaching a link to the font used in the issue (github won't let me upload) https://drive.google.com/file/d/122HnsJMVJFZ34gZ_HUy8mcF3b-qH7msL/view?usp=sharing Also worth nothing that this is the log trace when using the C apis ![]() It loads the file, and then also loads the font data. raylib-cr seems to have trouble opening the data for me, and seemingly tries to access a NULL pointer. |
I'm a bit confused because everything looks correct for |
Something else is up. I can use the font totally fine. You may have unloaded the font too early. I cannot reproduce. :( |
Yup, user error. I have to init the window first. 🤦. I think because raylib loads font into the GPU. |
Damn I was gonna say that earlier but I wasn't sure. Yeah, anything that uses a texture backing (like font) needs to have |
Thanks for helping look into this, sorry for the worries. I'll close it. |
@sol-vin btw, curious if this sounds like something you'd like to work with/on? Working on an agnostic frontend framework, currently using raylib-cr as the backend. This is a whole component. And the template is also minimal
|
Summary
The font handling within raylib-cr fails, using both v4.2 and v5.0.
I'm on MacOSX.
I have another project in C that uses the raylib apis directly, which works with both 4.2 and 5.
I don't see anything off with the bindings unfortunately, so I wonder if there is something else at play.
Minimal reproducible example
Stacktrace
Expected
Raylib.load_font
doesn't segfault.Actual
Raylib.load_font
segfaults.The text was updated successfully, but these errors were encountered: