So I want the plus sign to be stored as a string and displayed to the screen later; so in this case I have
String plusSign = "+";
but when I display the above on screen, I get a weird plus sign that has a circle around it. I am using the variable in an app that I'm making so using android may have something to do with the strange format. Is this how the plus sign is supposed to look or is there a way to make it look like a normal plus(a cross with no circle)?
Let me add some alternatives I've tried. The first thing I did was see if the unicode version of the plus sign would look any different but nothing appeared when I displayed it(the code was \u002B). I, also, looked at the ascii version but I wasn't sure how to convert it to a string.
Here is the code I use to display the string onScreen
Addition = new Text(PositionX, PositionY, standardFont, "Intergers" + plusSign + "Integers");
mScene.attachChild(Addition);
I use andEngine, so here is the Text class http://code.google.com/p/andengine/source/browse/src/org/anddev/andengine/entity/text/Text.java
It looks like it is related to android: http://www.droidforums.net/forum/droid-x-faq/65474-what-those-icons.html
So it seems like if you use a font that does not support a certain character, it defaults to what ever android uses.
Source: Tips4all
It looks to me like the most likely culprit is the font you are using. I would double check that the plus symbol doesn't have a circle in that font. There is another symbol, the "xor" symbol ("\u2295") that is a plus with a circle around it. I can't think of a reason why the plus symbol would be replaced with this symbol, but you might try displaying this character specifically to see if it looks like what you are seeing in the font you are using.
ReplyDeleteString plusSign = "\u002B"; // unicode
ReplyDeleteString plusSign = URLEncoder.encode("+", "UTF-8");
ReplyDelete