deltaphc / raylib-rs

Rust bindings for raylib
Other
715 stars 123 forks source link

Add binding for `LoadFontFromMemory` #153

Open ricmatsui opened 1 year ago

ricmatsui commented 1 year ago

Adding binding for LoadFontFromMemory as RaylibHandle::load_font_from_memory. Closes #107

https://github.com/raysan5/raylib/blob/4fd1e04e706bdf290377b7b29d2706fa5954afb1/src/rtext.c#L494-L495

Klebestreifen commented 5 months ago

The problem was on my side. As far as I know, the raylib documentation states that the string must be ".ttf". So with a dot and in lower case. I have already closed #107, as this error was pointed out there.

IoIxD commented 5 months ago

This PR should be redone for to the fork mentioned in the README, branch 5.1.0, bevause thats the one thats currently being developed.

IoIxD commented 5 months ago

Redid it myself. https://github.com/raylib-rs/raylib-rs/

dmgolembiowski commented 5 months ago

Redid it myself. https://github.com/raylib-rs/raylib-rs/

Thanks @IoIxD, I've been pinning my project on your fork. Until today, I've been running:

[dependencies.raylib]
git = "https://github.com/IoIxD/raylib-rs"
branch = "update-useable-fork"

because of its Texture2D and Image support. Although, Image::load_image_from_mem has never worked for me. Runtime image loading works fine when you supply a path, but otherwise not.

Could you take a look at my comment about your merge from yesterday?