ratalaika / angel-engine

Automatically exported from code.google.com/p/angel-engine
0 stars 0 forks source link

Text System refactor #50

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am using Angel v2.2 with VS2005 & VS2008, and I think it is really awesome!
Recently I am developing my first game, after most works did I find this 
problem.
I want to use some Chinese Fonts for my friends think English is confusing!!!
My English is poor and find it difficult to make it out. So can you help me? 
Thanks!

PS: Is there some methods to make the Actor objects rendered more accurately?
Well, I like to use many small graphics rather than a big one. But when I 
tried, the edge does not fit perfectly!

Another thank to you all. I tried some engines, at last I choosed Angel and I 
want to use Angel to finish my first game. 

Original issue reported on code.google.com by sinclo...@gmail.com on 13 Apr 2011 at 2:04

GoogleCodeExporter commented 9 years ago
Glad to hear you like Angel! 

There are two issues here, and I'll take the second one first. 

OpenGL doesn't guarantee pixel-perfect rendering on any platform, and counting 
on polygon edges lining up precisely based on floating point positions is a 
dicey proposition. Consider adding borders or overlap to your actors to cover 
those seams. (This issue is not something we really have control over, so I'll 
consider this bug to be about non-ASCII text from here on out.)

As for the text issue:
Oh man. The unfortunate answer right now is "no, Angel does not support Chinese 
text." The good news is that the underlying text rendering library (FTGL) seems 
to support Unicode just fine, so it wouldn't be impossible to add this support. 

I'm going to track this as a feature request, and add better text support in 
the next release. This won't make 3.0, but is a good candidate for 3.1, 
provided there aren't too many bug-fixes needed for 3.0.

Thanks, and good luck with your game! 

Original comment by lieseg...@gmail.com on 14 Apr 2011 at 12:18

GoogleCodeExporter commented 9 years ago
I am really glad to hear that. When will ver3.0 be released? I am so excited!
And is GUI added to the ver3.0 or in the plan of ver3.1?

Original comment by sinclo...@gmail.com on 16 Apr 2011 at 12:36

GoogleCodeExporter commented 9 years ago
3.0 is on the horizon -- within a few weeks. Hard to say when 3.1 will show up 
-- real-life projects must take precedence. :-)

No plans for a GUI -- Angel is strictly focused on the OpenGL game context. 

Original comment by lieseg...@gmail.com on 16 Apr 2011 at 2:10

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
you can use the following function to convert string to wstring before FTGL’s 
render function be called. FTGL’s render function accept a wchar_t pointer, 
and it work well with Chinese text.
but this function will change the locale setting,include the keyboard layout. 
So the glfw's input can't work fine,but "A" - "Z" and "0" - "9" still work. 
Even I change the locale setting back to classic after call this function,this 
problem still there.

Original comment by msk12345@gmail.com on 20 Apr 2011 at 6:57

Attachments:

GoogleCodeExporter commented 9 years ago
Yeah, as you've found, it's not a trivial problem. :-) Most likely will end up 
having a separate kind of TextActor that deals with wide strings, and have you 
commit to a locale/encoding at startup. 

Original comment by lieseg...@gmail.com on 20 Apr 2011 at 10:26

GoogleCodeExporter commented 9 years ago
“have you commit to a locale/encoding at startup.”
Pardon me for not understand what you mean. My English is not good enough. :-P 
I do nothing about locale/encoding both in IDE and program, except the function.

Original comment by msk12345@gmail.com on 20 Apr 2011 at 12:14

GoogleCodeExporter commented 9 years ago
I know why some keys don't work.
In function InputManager::IsKeyDown,there have a 
"toupper()"(InputManager.cpp,line 334).In Chinese locale set,it also change the 
value except for printable keys! So I guess it's better that check whether the 
key is a lowwer letter before call the "toupper" function.

Original comment by msk12345@gmail.com on 3 May 2011 at 1:52

GoogleCodeExporter commented 9 years ago
BTW,my platform is Windows 7 x64, IDE is Visual Studio 2008

Original comment by msk12345@gmail.com on 3 May 2011 at 2:06

GoogleCodeExporter commented 9 years ago
is this problem fixed in now subversion source code ? 

Original comment by zsp...@gmail.com on 10 Dec 2012 at 6:00

GoogleCodeExporter commented 9 years ago
Issue 74 has been merged into this issue.

Original comment by lieseg...@gmail.com on 28 Sep 2013 at 6:11

GoogleCodeExporter commented 9 years ago
Renaming to account for more general refactor that needs to happen. 

Original comment by lieseg...@gmail.com on 28 Sep 2013 at 6:12

GoogleCodeExporter commented 9 years ago
Done in Angel4

Original comment by lieseg...@gmail.com on 7 Feb 2014 at 5:57

GoogleCodeExporter commented 9 years ago

Original comment by lieseg...@gmail.com on 7 Feb 2014 at 5:57