Details

      Description

      {html}<div><p><em>Feature Request</em></p>
      <p>Support for Custom Fonts on Android Devices.</p></div>{html}

        Activity

        No builds found.
        Alan Leard created issue -
        Alan Leard made changes -
        Field Original Value New Value
        Labels custom enterprise feature font fontfamily klist
        Bill Dawson made changes -
        Attachment chantelli-antiqua.zip [ 18316 ]
        Bill Dawson made changes -
        Attachment screenshot.png [ 18317 ]
        Don Thorp made changes -
        Labels custom enterprise feature font fontfamily klist android custom enterprise feature font fontfamily klist reported-1.6.1 rplist
        Don Thorp made changes -
        Fix Version/s Release 1.7.0 [ 11244 ]
        Fix Version/s TBS [ 11258 ]
        Don Thorp made changes -
        Labels android custom enterprise feature font fontfamily klist reported-1.6.1 rplist android custom enterprise feature font fontfamily klist release-1.7.0 reported-1.6.1 rplist
        Hide
        Don Thorp added a comment -
        {html}<div><p>Needs to go on 1.6.2 as well.</p></div>{html}
        Show
        Don Thorp added a comment - {html}<div><p>Needs to go on 1.6.2 as well.</p></div>{html}
        Hide
        Bill Dawson added a comment -
        {html}<div><p>(from <a href=
        "/projects/32238/changesets/d06a815b13625e60d5f43f717420af9ab2308db6"
        title=
        "Changeset [d06a815b13625e60d5f43f717420af9ab2308db6]">[d06a815b13625e60d5f43f717420af9ab2308db6]</a>)
        Support custom fonts loaded in assets/fonts. [<a href=
        "/projects/32238/tickets/3418" title="Ticket #3418">#3418</a>]
        <a href=
        "https://github.com/appcelerator/titanium_mobile/commit/d06a815b13625e60d5f43f717420af9ab2308db6">
        https://github.com/appcelerator/titanium_mobile/commit/d06a815b1362...</a></p></div>{html}
        Show
        Bill Dawson added a comment - {html}<div><p>(from <a href= "/projects/32238/changesets/d06a815b13625e60d5f43f717420af9ab2308db6" title= "Changeset [d06a815b13625e60d5f43f717420af9ab2308db6] "> [d06a815b13625e60d5f43f717420af9ab2308db6] </a>) Support custom fonts loaded in assets/fonts. [<a href= "/projects/32238/tickets/3418" title="Ticket #3418">#3418</a>] <a href= "https://github.com/appcelerator/titanium_mobile/commit/d06a815b13625e60d5f43f717420af9ab2308db6"> https://github.com/appcelerator/titanium_mobile/commit/d06a815b1362 ...</a></p></div>{html}
        Hide
        Bill Dawson added a comment -
        {html}<div><p>(from <a href=
        "/projects/32238/changesets/89670092e070d0c67f04300becd3b18285b3753a"
        title=
        "Changeset [89670092e070d0c67f04300becd3b18285b3753a]">[89670092e070d0c67f04300becd3b18285b3753a]</a>)
        Move the default font file location to Resources/fonts so as to
        take advantage of our built-in builder.py file
        delta/deletion/addition checking. [<a href=
        "/projects/32238/tickets/3418" title="Ticket #3418">#3418</a>]
        <a href=
        "https://github.com/appcelerator/titanium_mobile/commit/89670092e070d0c67f04300becd3b18285b3753a">
        https://github.com/appcelerator/titanium_mobile/commit/89670092e070...</a></p></div>{html}
        Show
        Bill Dawson added a comment - {html}<div><p>(from <a href= "/projects/32238/changesets/89670092e070d0c67f04300becd3b18285b3753a" title= "Changeset [89670092e070d0c67f04300becd3b18285b3753a] "> [89670092e070d0c67f04300becd3b18285b3753a] </a>) Move the default font file location to Resources/fonts so as to take advantage of our built-in builder.py file delta/deletion/addition checking. [<a href= "/projects/32238/tickets/3418" title="Ticket #3418">#3418</a>] <a href= "https://github.com/appcelerator/titanium_mobile/commit/89670092e070d0c67f04300becd3b18285b3753a"> https://github.com/appcelerator/titanium_mobile/commit/89670092e070 ...</a></p></div>{html}
        Don Thorp made changes -
        Fix Version/s Sprint 2011-13 [ 11248 ]
        Fix Version/s Release 1.7.0 [ 11244 ]
        Priority Trivial [ 5 ] Major [ 3 ]
        Hide
        Bill Dawson added a comment -
        {html}<div><p>To use this, put your custom (third-party) font files in
        <code>Resources/fonts</code> (or
        <code>Resources/android/fonts</code> if you prefer ... both will be
        handled). Then when setting the <code>font</code> property of the
        view (Label, TextField, etc.), set the <code>fontFamily</code>
        member to the base filename of the font file (i.e., the file name
        without the extension).</p>
        <p><strong>EXAMPLE</strong> (to be used for QE testing as
        well):</p>
        <ul>
        <li>
        <p>Create a new project.</p>
        </li>
        <li>
        <p>Create the <code>Resources/fonts</code> folder in that
        project.</p>
        </li>
        <li>
        <p>Download and unzip the attached Chantelli-Antiqua.zip file, and
        copy Chantelli-Antiqua.ttf into your <code>Resources/fonts</code>
        folder.</p>
        </li>
        <li>
        <p>Use this as your app.js:</p>
        </li>
        </ul>
        <pre>
        <code class="javascript">Titanium.UI.setBackgroundColor('#000');
        var win = Titanium.UI.createWindow({ title:'Test', backgroundColor:'#000', exitOnClose: true, layout: 'vertical' });

        var lbl = Ti.UI.createLabel({
        text: "Now is the time for all good men to come to the aid of their country",
        font: {fontFamily: 'chantelli_antiqua', fontSize: '15dp'},
        height: 'auto',
        width: 'auto',
        top:10,
        backgroundColor: 'red',
        color: 'white'
        });
        win.add(lbl);

        var tf = Ti.UI.createTextField({
        hintText: "Type here",
        font: {fontFamily: 'Chantelli_antiqua', fontSize: '15dp'},
        height: 'auto', width: '100%',
        top: 10
        });
        win.add(tf);

        var ta = Ti.UI.createTextArea({
        hintText: "Type here, mein Freund",
        font: {fontFamily: 'Chantelli_antiqua', fontSize: '15dp'},
        height: '80dp', width: '100%', borderRadius: '5',
        top: 10
        });
        win.add(ta);

        var btn = Ti.UI.createButton({
        font: {fontFamily: 'Chantelli_antiqua', fontSize: '15dp'},
        title: 'I am a button',
        height: 'auto', width: 'auto',
        top: 10
        });
        win.add(btn);

        var btn2 = Ti.UI.createButton({
        font: {fontFamily: 'Chantelli_antiqua', fontSize: '15dp', fontWeight: 'bold'},
        title: 'I am also a button',
        height: 'auto', width: 'auto',
        top: 10
        });
        win.add(btn2);

        var btn3 = Ti.UI.createButton({
        font: {fontFamily: 'Chantelli_antiqua', fontSize: '25dp', fontWeight: 'bold'},
        title: 'Ah, but so am I a button',
        height: 'auto', width: 'auto',
        top: 10
        });
        win.add(btn3);

        win.open();</code>
        </pre>
        <p>Notice in several places we're setting <code>font: {fontFamily: 'Chantelli_antiqua' ... }</code>. (Case doesn't matter.)</p>
        <p>When you run it, you will (or should) notice that the font is
        not a standard font. See attached screenshot.png.</p></div>{html}
        Show
        Bill Dawson added a comment - {html}<div><p>To use this, put your custom (third-party) font files in <code>Resources/fonts</code> (or <code>Resources/android/fonts</code> if you prefer ... both will be handled). Then when setting the <code>font</code> property of the view (Label, TextField, etc.), set the <code>fontFamily</code> member to the base filename of the font file (i.e., the file name without the extension).</p> <p><strong>EXAMPLE</strong> (to be used for QE testing as well):</p> <ul> <li> <p>Create a new project.</p> </li> <li> <p>Create the <code>Resources/fonts</code> folder in that project.</p> </li> <li> <p>Download and unzip the attached Chantelli-Antiqua.zip file, and copy Chantelli-Antiqua.ttf into your <code>Resources/fonts</code> folder.</p> </li> <li> <p>Use this as your app.js:</p> </li> </ul> <pre> <code class="javascript">Titanium.UI.setBackgroundColor('#000'); var win = Titanium.UI.createWindow({ title:'Test', backgroundColor:'#000', exitOnClose: true, layout: 'vertical' }); var lbl = Ti.UI.createLabel({ text: "Now is the time for all good men to come to the aid of their country", font: {fontFamily: 'chantelli_antiqua', fontSize: '15dp'}, height: 'auto', width: 'auto', top:10, backgroundColor: 'red', color: 'white' }); win.add(lbl); var tf = Ti.UI.createTextField({ hintText: "Type here", font: {fontFamily: 'Chantelli_antiqua', fontSize: '15dp'}, height: 'auto', width: '100%', top: 10 }); win.add(tf); var ta = Ti.UI.createTextArea({ hintText: "Type here, mein Freund", font: {fontFamily: 'Chantelli_antiqua', fontSize: '15dp'}, height: '80dp', width: '100%', borderRadius: '5', top: 10 }); win.add(ta); var btn = Ti.UI.createButton({ font: {fontFamily: 'Chantelli_antiqua', fontSize: '15dp'}, title: 'I am a button', height: 'auto', width: 'auto', top: 10 }); win.add(btn); var btn2 = Ti.UI.createButton({ font: {fontFamily: 'Chantelli_antiqua', fontSize: '15dp', fontWeight: 'bold'}, title: 'I am also a button', height: 'auto', width: 'auto', top: 10 }); win.add(btn2); var btn3 = Ti.UI.createButton({ font: {fontFamily: 'Chantelli_antiqua', fontSize: '25dp', fontWeight: 'bold'}, title: 'Ah, but so am I a button', height: 'auto', width: 'auto', top: 10 }); win.add(btn3); win.open();</code> </pre> <p>Notice in several places we're setting <code>font: {fontFamily: 'Chantelli_antiqua' ... }</code>. (Case doesn't matter.)</p> <p>When you run it, you will (or should) notice that the font is not a standard font. See attached screenshot.png.</p></div>{html}
        Hide
        Bill Dawson added a comment -
        {html}<div><p>(from <a href=
        "/projects/32238/changesets/0243d42c591e2ec96defa95302597f27fb21af19"
        title=
        "Changeset [0243d42c591e2ec96defa95302597f27fb21af19]">[0243d42c591e2ec96defa95302597f27fb21af19]</a>)
        Move the default font file location to Resources/fonts so as to
        take advantage of our built-in builder.py file
        delta/deletion/addition checking. [<a href=
        "/projects/32238/tickets/3418" title="Ticket #3418">#3418</a>]
        <a href=
        "https://github.com/appcelerator/titanium_mobile/commit/0243d42c591e2ec96defa95302597f27fb21af19">
        https://github.com/appcelerator/titanium_mobile/commit/0243d42c591e...</a></p></div>{html}
        Show
        Bill Dawson added a comment - {html}<div><p>(from <a href= "/projects/32238/changesets/0243d42c591e2ec96defa95302597f27fb21af19" title= "Changeset [0243d42c591e2ec96defa95302597f27fb21af19] "> [0243d42c591e2ec96defa95302597f27fb21af19] </a>) Move the default font file location to Resources/fonts so as to take advantage of our built-in builder.py file delta/deletion/addition checking. [<a href= "/projects/32238/tickets/3418" title="Ticket #3418">#3418</a>] <a href= "https://github.com/appcelerator/titanium_mobile/commit/0243d42c591e2ec96defa95302597f27fb21af19"> https://github.com/appcelerator/titanium_mobile/commit/0243d42c591e ...</a></p></div>{html}
        Hide
        Bill Dawson added a comment -
        {html}<div><p>(from <a href=
        "/projects/32238/changesets/9a03aba397daa01ca562a7f82192bf82791cd0c1"
        title=
        "Changeset [9a03aba397daa01ca562a7f82192bf82791cd0c1]">[9a03aba397daa01ca562a7f82192bf82791cd0c1]</a>)
        Support custom fonts loaded in assets/fonts. [<a href=
        "/projects/32238/tickets/3418" title="Ticket #3418">#3418</a>]
        <a href=
        "https://github.com/appcelerator/titanium_mobile/commit/9a03aba397daa01ca562a7f82192bf82791cd0c1">
        https://github.com/appcelerator/titanium_mobile/commit/9a03aba397da...</a></p></div>{html}
        Show
        Bill Dawson added a comment - {html}<div><p>(from <a href= "/projects/32238/changesets/9a03aba397daa01ca562a7f82192bf82791cd0c1" title= "Changeset [9a03aba397daa01ca562a7f82192bf82791cd0c1] "> [9a03aba397daa01ca562a7f82192bf82791cd0c1] </a>) Support custom fonts loaded in assets/fonts. [<a href= "/projects/32238/tickets/3418" title="Ticket #3418">#3418</a>] <a href= "https://github.com/appcelerator/titanium_mobile/commit/9a03aba397daa01ca562a7f82192bf82791cd0c1"> https://github.com/appcelerator/titanium_mobile/commit/9a03aba397da ...</a></p></div>{html}
        Hide
        Bill Dawson added a comment -
        {html}<div><p>QE: please test both in master and 1_6_X, as it was specifically
        requested that this feature be added to 1_6_X</p></div>{html}
        Show
        Bill Dawson added a comment - {html}<div><p>QE: please test both in master and 1_6_X, as it was specifically requested that this feature be added to 1_6_X</p></div>{html}
        Bill Dawson made changes -
        Labels android custom enterprise feature font fontfamily klist release-1.7.0 reported-1.6.1 rplist android custom enterprise feature font fontfamily klist release-1.6.2 release-1.7.0 reported-1.6.1 rplist
        Bill Dawson made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed - in QA [ 9 ]
        Ralf Pfeiffer made changes -
        Customer yes
        Ralf Pfeiffer made changes -
        Issue Type Bug [ 1 ] New Feature [ 2 ]
        Ralf Pfeiffer made changes -
        Fix Version/s Release 1.7.0 [ 11244 ]
        Nikolai Derzhak made changes -
        Workflow Titanium lite [ 67550 ] Titanium full [ 70971 ]
        Don Thorp made changes -
        Fix Version/s Release 1.6.2 [ 11260 ]
        Hide
        Natalie Huynh added a comment -

        Tested with [INFO] Titanium SDK version: 1.6.2 (04/18/11 17:16 878906d) on
        Nexus S 2.3.2
        Emulator 2.1

        Show
        Natalie Huynh added a comment - Tested with [INFO] Titanium SDK version: 1.6.2 (04/18/11 17:16 878906d) on Nexus S 2.3.2 Emulator 2.1
        Natalie Huynh made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Opie Cyrus made changes -
        Resolution Fixed - in QA [ 9 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Opie Cyrus made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        3s 1 Bill Dawson 14/Apr/11 8:44 PM
        Resolved Resolved Closed Closed
        3d 13h 22m 1 Natalie Huynh 18/Apr/11 10:07 AM
        Closed Closed Reopened Reopened
        27d 17h 46m 1 Opie Cyrus 16/May/11 3:53 AM
        Reopened Reopened Closed Closed
        1m 7s 1 Opie Cyrus 16/May/11 3:54 AM

          People

          • Assignee:
            Don Thorp
            Reporter:
            Alan Leard
          • Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development