Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-18156

MobileWeb: Custom fonts are not working

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 3.3.0, Release 3.4.0, Release 3.4.1
    • Fix Version/s: Release 4.1.0
    • Component/s: MobileWeb
    • Labels:
    • Environment:

      TI SDK 3.4.1, 3.4.0, 3.3.0.
      Google Chrome
      Firefox

    • Story Points:
      8
    • Sprint:
      2015 Sprint 07 SDK

      Description

      Problem Description

      Custom fonts are not working on MobileWeb, But works well on Android and IOS.

      Steps to reproduce

      1. Create new mobile project (classic titanium)
      2. Add this code:

      var win = Ti.UI.createWindow({ 
      backgroundColor: 'white', 
      layout: 'vertical', 
      title: 'Label Demo' 
      }); 
       
      var label1 = Ti.UI.createLabel({ 
      color: '#900', 
      font: { fontFamily: "ShadowsintoLight", fontSize:48 }, 
      text: 'A simple label', 
      textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER, 
      top: 30, 
      width: Ti.UI.SIZE, height: Ti.UI.SIZE 
      }); 
       
      var label2 = Ti.UI.createLabel({ 
      color:'blue', 
      font: { 
      fontFamily: "ShadowsintoLight", 
      fontSize: 14 
      }, 
      text: 'A long label with\na few line breaks\nand unicode (UTF8)\nsymbols such as\na white chess piece \u2655\nand the euro symbol \u20ac\nlooks like this!\n', 
      textAlign: Ti.UI.TEXT_ALIGNMENT_LEFT, 
      top: 30, 
      width: 300, height: 200 
      }); 
       
      win.add(label1); 
      win.add(label2); 
      win.open(); 
      

      3. Create a fonts directory inside Resources
      4. copy the attached font to the fonts directory.
      5. Select 3.4.1.GA as the Mobile SDK
      6. Run in mobile web

      Actual Results

      The custom fonts are not show.

      Expected results

      The custom fonts should appear, as used to happen with Mobile SDK 3.2.3.

      Extra info

      I tested this and the last known working version is Mobile SDK 3.2.3.GA

        Attachments

          Activity

            People

            • Assignee:
              cbarber Chris Barber
              Reporter:
              sliang Shuo Liang
              Reviewer:
              Feon Sua Xin Miao
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-19444
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code