Custom Fonts for DataField (no more possible?)

I am not certain if this is a new item where custom fonts are not allowed to be used/compiled into a datafield.
I have seen datafields on the store which uses custom fonts, but for the life of me, I am not able to get it to work on the CIQ 2.2.6 (I have tried 2.2.4 as well and i do not have any older revision of the CIQ SDK to test).

This is what I'm doing,

function onLayout(dc) {
font_12 = Ui.loadResource(Rez.Fonts.id_rob_12);
}


When I add the above line, I get the following error on the sim

Failed invoking <symbol>
Invalid Value
in onLayout (source\FieldView.mc:48)


I did the usual declaration of the var for font_12 (var font_12)

I also did the BMFont thing as well.
I believe I have tried a few permutations, but am unable to get it working.
  • I've tried SDK 2.1.2 / 2.2.2 / 2.2.4 and 2.2.6 and all of them has this error.
    I've tried it w/ code I used prev for the my datafield w/ custom font and errors spews out everywhere.

    Has anyone got issues w/ custom fonts on a DataField??
    When it's a Watch-App, it works fine.
  • Interesting.. I've tried a few projects and all of them failed.

    https://github.com/vovan-/swimmer-datafiled-garmin/tree/master/resources

    I've also tried this project from GitHub and it didn't work as well.

    The only other thing which I can think about is that I'm doing the compilation from the command line instead of using eclipse.
    Do you mind to see if that guithub project compiles fine?

    monkeyc -o bin/Debug.prg -m manifest.xml -z resources/resources.xml;resources/properties.xml source/*.mc -y developer_key.der
  • nikeow - Try it in eclipse. I'm betting your missing something in your command line (not finding the resources?). I never use the command line so it doesn't jump out to me. But you do make an assumption about things like where things are under resources... I don't see a reference to any fonts....

    If that works, use the command line you see in the eclipse console if you want.
  • monkeyc -o bin/Debug.prg -m manifest.xml -z resources/resources.xml;resources/properties.xml source/*.mc -y developer_key.der

    Is the resource file that contains the font resources on your compile line?
  • I tried the same project on Eclipse and it worked fine.

    I then copied the command it used to compile and then dissected it slowly and ended up I managed to get it running w/ the new custom fonts.

    the missing item is per below..

    FAILED --> monkeyc -o bin/Debug1.prg -y developer_key.der -m manifest.xml -z resources/properties.xml;resources/resources.xml source/*.mc
    WORKED --> monkeyc -o bin/Debug1.prg -y developer_key.der -m manifest.xml -z resources/properties.xml;resources/resources.xml source/*.mc -d fenix5_sim