You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unless I'm dense, I don't see a way to render a Gosu::Image from text using a previously loaded (and modified with Font#[]=) Gosu::Font, since the latter takes the name of a font as an argument, rather than a Gosu::Font instance.
Could this be put on the enhancement list?
The text was updated successfully, but these errors were encountered:
You are right, Font#[]= and Image::from_text are not compatible right now. The technical/philosophical background is that Gosu::Font is a bitmap font with no support for kerning, and Image::from_text will apply proper kerning, which results in prettier but more expensive text rendering. This is also why Font#width and Image#text_width are separate methods with separate results.
I think the best way forward would be to add kerning support to Font so that both mechanisms become more interchangeable.
Thank you for the clarification. My current use case doesn't really need the extra performance of prerendered text, so I'll just use the Font#draw_* methods, perhaps with Gosu#record where appropriate.
Unless I'm dense, I don't see a way to render a Gosu::Image from text using a previously loaded (and modified with Font#[]=) Gosu::Font, since the latter takes the name of a font as an argument, rather than a Gosu::Font instance.
Could this be put on the enhancement list?
The text was updated successfully, but these errors were encountered: