ANGELFONT+TEXT EXAMPLE

Monkey Targets Forums/Android/ANGELFONT+TEXT EXAMPLE

degac(Posted 2011) [#1]
I'm trying to run the examples ANGELFONT and TEXT EXAMPLE on the Android emulator.
I get various errors (on the emulator, not when compiled!)


Anyone else?

I've tested various other examples and they works.


Perturbatio(Posted 2011) [#2]
Yep, it's failing for me as well, fails on my phone too.


Volker(Posted 2011) [#3]
Fails here to.


therevills(Posted 2011) [#4]
The issue is on line 77 in AngelFont.monkey:

kernPairs.Insert(String.FromChar(Int(data[0]))+"_"+String.FromChar(Int(data[1])), New KernPair(Int(data[0]), Int(data[1]), Int(data[2])))


If I comment this line out it runs fine on Android...


Also looking in the AngelFont code, he is using Insert which is deprecated...

Some reason in Android/java data[2] is null...


therevills(Posted 2011) [#5]
After a lot of headaches, the problem is that the variable line contains the following:

"39,65,-1 " - 9 characters

and the Java is doing this:

bbd = Integer.parseInt(bbdata[2]);


It should be doing this:
bbd = Integer.parseInt(bbdata[2].trim());


I believe this is a Monkey bug, but you can fix it in the monkey code:

Change line 77 of angelfont.monkey to:

kernPairs.Insert(String.FromChar(Int(data[0]))+"_"+String.FromChar(Int(data[1].Trim())), New KernPair(Int(data[0].Trim()), Int(data[1].Trim()), Int(data[2].Trim())))