Question

i have deploy my app to android and every word that have the greek letter (π) have be replaced with rectangle(is the only letter that is missing. Anyone know something about this?can anyone provide any solution with this problem? thank you

  put uniDecode(the unicodetext of fld "t01","UTF8") into Rtext
set the unicodeText of field "t1" to uniEncode (Rtext,"UTF8")
Was it helpful?

Solution

It is not clear how the script is related to your question. Instead of

put uniDecode(the unicodetext of fld "t01","UTF8") into Rtext
set the unicodeText of field "t1" to uniEncode (Rtext,"UTF8")

you can use

set the unicodeText of fld "t1" to the unicodeText of fld "t01"

(In LiveCode 7 this won't be necessary any more).

If you are using a computer with OSX, you are probably typing option-p to get the π symbol quickly. Unfortunately, this is a higher ASCII symbol, which is decoded in a different way on other computer systems. Therefore it displays incorrectly on Android.

To get the unicode equivalent, instead of the higher ASCII symbol, of π, you can use the following script:

set the useUnicode to true
set the unicodetext of fld 1 to numToChar(0x3c0)

Android should be able to display this correctly. If this doesn't work, you can try to include your own font by including it in your standalone package.

To include a font in your standalone package, go to the Files tab of the Standalone Application Settings. Just add your own font file to the list. Don't select the parent folder of the font file. The font will sit next to the mainstack of your project inside the standalone package and LiveCode will find it automatically. Make sure to set the textFont property of your fields accordingly.

OTHER TIPS

Jukka has it right, are you using a custom font or a built in one? either way i recommend switching to a custom font and making sure it has( or add yourself) the missing letter. if you need help setting a custom font please let me know!

http://www.1001freefonts.com/comic-cartoon-fonts.php find a font with the chars u need, make a new folder called fotns in your assets folder and put it there... then in oncreate

  Typeface  font = Typeface.createFromAsset(getAssets(), "fonts/YOURFONT.ttf");                                //then set each textview like so                                                   tv = (TextView) findViewById(R.id.cheatwarn);
        tv.setTypeface(font);

if your using a surface to draw text, pass font in when you create surface and create a TextPaint() and set its typeface the same... if your using surfaceview you will need to change getassets to getBaseContext.getAssets()

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top