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

support input unicode character #45

Closed
yushli opened this issue Aug 21, 2015 · 6 comments
Closed

support input unicode character #45

yushli opened this issue Aug 21, 2015 · 6 comments

Comments

@yushli
Copy link

yushli commented Aug 21, 2015

Currently it seems turbobadger doesn't support input unicode character (e.g., Chinese). Is there any plan to add this support? Thanks.

@fruxo
Copy link
Owner

fruxo commented Aug 21, 2015

I have no such plans at the moment.

It wouldn't be such a big task to add API's and handling in Turbo Badger, but the actual platform integrations are a major pain to implement due to many undocumented behaviors of different input methods (i've done this before in proprietary software).

@yushli
Copy link
Author

yushli commented Sep 10, 2015

I notice the display of text also doesn't support unicode. Would you like to add this support, e.g., for displaying Chinese text.

@fruxo
Copy link
Owner

fruxo commented Sep 10, 2015

It does. You just have to use a font that contains Chinese characters.

@yushli
Copy link
Author

yushli commented Sep 10, 2015

looks like the default demo is not using freetype font. Which font file should I replace to see the result?

@fruxo
Copy link
Owner

fruxo commented Sep 10, 2015

You can define TB_FONT_RENDERER_STB or TB_FONT_RENDERER_FREETYPE to make it support true type fonts. The demo then loads resources/vera.ttf by default (which doesn't contain chinese).

You can add another true type font file containing chinese and make it the default. All this is done in Demo/demo01/Demo01.cpp

@yushli
Copy link
Author

yushli commented Sep 11, 2015

it works now. Thank you for your kind help.
TurboBadger is a nice library. Keep up the good work!

@yushli yushli closed this as completed Jun 20, 2023
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