Harry
Member
|
[Solved] Font Replace
font.replace("ś","s");
What's wrong with this code?
1>d:\forest valley\source\intro.cpp(10) : error C2664: 'EE::Font::replace' : cannot convert parameter 1 from 'const wchar_t [2]' to 'Char'
1> There is no context in which this conversion is possible
(This post was last modified: 02-14-2011 11:21 AM by Harry.)
|
|
10-22-2009 06:40 PM |
|
Esenthel
Administrator
|
RE: Font Replace
font.replace(L'ś', L's');
|
|
10-22-2009 07:15 PM |
|
Harry
Member
|
RE: Font Replace
What is the difference between "ś" and 'ś' ?
(This post was last modified: 10-22-2009 07:33 PM by Harry.)
|
|
10-22-2009 07:31 PM |
|
Esenthel
Administrator
|
RE: Font Replace
"" always indicates zero/NULL terminated string, which in this case translates to array of 2 characters 's', '\0'
char string[]="s";
is equal to
char string[]={'s','\0'};
's' is only one character
|
|
10-22-2009 08:04 PM |
|
Harry
Member
|
RE: Font Replace
Ok. Thanks. Now I've got small problem, because in some texts i use txds files which are made in Gui Editor. What can I do with this texts and polish letters? font.replace makes nothing.
(This post was last modified: 10-22-2009 08:12 PM by Harry.)
|
|
10-22-2009 08:10 PM |
|
Esenthel
Administrator
|
RE: Font Replace
font.replace does work, I tested it, you need to call it after loading a font (for each font separately)
you can access all fonts from font cache 'Fonts' and FontDefault
|
|
10-22-2009 09:29 PM |
|
Harry
Member
|
RE: Font Replace
Ok. I found a way to fix this. Thanks.
|
|
10-23-2009 02:43 PM |
|