titaniumtitanium-sdk

how to use TM symbol in titanium UI component


I want to use TM (trademark symbol) while creating label.

Ti.UI.createLabel({
        text: '© ' + (new Date().getFullYear()) + ' companyname 0xE2 0x84 0xA2',
        font: {
            fontSize: 13,
            fontWeight: 'bold',
            fontFamily: 'Verdana'
        },
        color: '#FFFFFF',
        left: 3,
        bottom: 5,
        visible: false
    });

Previously used copyright symbol as copy-paste. but this will be last option.

Any help ?


Solution

  • you can use it like this:

    var l = Ti.UI.createLabel({
        text: '© ' + (new Date().getFullYear()) + ' companyname \u2122',
        font: {
            fontSize: 20,
            fontWeight: 'bold'
        },
        color: '#000'
    });
    

    it will display © 2020 companyname ™