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

Can build and run, however, cannot show font correctly #307

Open
ScottHuangZL opened this issue Sep 22, 2015 · 9 comments
Open

Can build and run, however, cannot show font correctly #307

ScottHuangZL opened this issue Sep 22, 2015 · 9 comments

Comments

@ScottHuangZL
Copy link

Dear Piston,

I am try to run the hello_world program, it can compile and run, however, the word did not show correct since the font not show correctly. It just use a filled rectangle to stands for each character.

Could you help to look into it? And give a hand to me? thanks.
I am use Win 7 64bit, Rust 1.5 nightly.

Btw, I also download other games to test, such as rocket and pong-rs, they can run well with same OS and Rust. Thanks.

Regards,
Scott Huang

@bvssvni
Copy link
Member

bvssvni commented Sep 23, 2015

This is probably an issue with libfreetype on windows. See PistonDevelopers/freetype-sys#37

@ScottHuangZL
Copy link
Author

The game "pong-rs" or "rocket" can build and run smoothly in my computer.
So, there should be some bug/issue in hello_world sample.
Please help to compare and find out root cause. Is it caused by they use glutin_window instead of piston_window?? How to resolve it? Thanks.

@ghost
Copy link

ghost commented Dec 15, 2015

This is also happening to me on Windows 7, 64-bit. I'm using Rust 1.5 stable.

@mitchmindtree
Copy link
Contributor

Hmm this does seem strange, I can't see anything wrong with the example after a quick look - are you able to test it with a different font perhaps?

@ghost
Copy link

ghost commented Dec 15, 2015

I will try and report back.

FWIW I'm investigating right now, and freetype-rs's single_glyph example seems to be working correctly. The only crate that depends on freetype-rs directly is piston2d-gfx_graphics, and the only crate that depends on that is piston_window itself (which is the crate I was using when I found this problem).

@ghost
Copy link

ghost commented Dec 15, 2015

I tried with a different font. Same (incorrect) result. Additionally, I have reason to believe the example is not wrong, as it works for me on Linux Mint, and a friend reported that it works for them on Windows 10.

@ghost
Copy link

ghost commented Dec 15, 2015

For reference, here's what the issue looks like:

bug

Note that this is a screenshot from a program slightly different from the example.

@ghost
Copy link

ghost commented Dec 15, 2015

One final note, I set up linkage to freetype as per these instructions:

https://github.com/PistonDevelopers/freetype-sys/blob/b7a07f53d1614a387fd7a6dc5cc9a2a33b8ac1f7/README.md

@ghost
Copy link

ghost commented Dec 15, 2015

Update: I cannot render an image at all on my system. I presume text rendering does not work because it creates an Image and renders with that. (Attempting to render an image results in the same black box of the same dimensions as the image.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants