Skip to content
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

Add basic font rendering to the media crate #16

Open
angered-ghandi opened this issue Jul 13, 2016 · 4 comments
Open

Add basic font rendering to the media crate #16

angered-ghandi opened this issue Jul 13, 2016 · 4 comments
Milestone

Comments

@angered-ghandi
Copy link
Owner

angered-ghandi commented Jul 13, 2016

The AOE CD comes with some fonts in the /system/fonts path. Unfortunately, it's not in the game data directory (I'm guessing the installer would add it to the system if necessary).

We'll need to be able to render these fonts to screen for upcoming debug/UI features. As a good first step, we should just integrate with rust-sdl2_ttf in the media crate, and add a simple render_text(&mut self, &str, &Point) function to the Renderer object. For now, it can just be hardcoded to use the arial font from the game disc. We'll want a proper font manager later.

@angered-ghandi
Copy link
Owner Author

The rusttype library also looks like it could work, and that would eliminate the need for the SDL2_ttf C library since it's written entirely in Rust.

@angered-ghandi angered-ghandi added this to the GUI milestone Aug 13, 2016
@phrohdoh
Copy link
Contributor

phrohdoh commented Dec 28, 2016

@angered-ghandi
Copy link
Owner Author

Nice!

@phrohdoh
Copy link
Contributor

@angered-ghandi thanks!
It isn't very clean at all currently (I have no idea where I can hook into the Renderer from an ECS).

Since you seem to be gone mostly I'll probably spend time working solely on my fork, possibly breaking the GitHub fork relationship if I can get this somewhat stable again (just need to figure out native debugging in vscode [ref: #70]).

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

No branches or pull requests

2 participants