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

MobileWeb: Custom .woff fonts not rendering on app

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Won't Fix
    • Affects Version/s: Release 3.3.0
    • Fix Version/s: Release 3.3.0
    • Component/s: MobileWeb
    • Labels:
    • Story Points:
      1
    • Sprint:
      2018 Sprint 04 Tooling

      Description

      Issue

      When using a custom font in a MobileWeb app the font is not correctly rendered, this used to worked correctly on SDK 3.2.3.GA but stopped working on 3.3.0.GA

      Testing

      While testing i notice in the index.html that the @font-face is different from 3.2.3.GA than the one in 3.3.0.GA

      @font-face in index.html SDK 3.2.3.GA

      @font-face{font-family:"futurastd-condensed-webfont";src:url("mobileweb/futurastd-condensed-webfont.woff");}
      

      @font-face in index.html SDK 3.3.0.GA

      @font-face{font-family:"futurastd-condensed-webfont";url("futurastd-condensed-webfont.woff") format("woff");}
      

      The source parameter is missing causing an error in the CSS and not rendering the font.

      Test code

       
      var win = Titanium.UI.createWindow({  
          title:'Tab 1',
          backgroundColor:'#fff'
      });
       
      var label = Titanium.UI.createLabel({
      	color:'#999',
      	text:'I am Window 1',
      	font:{
      		fontSize:20,
      		fontFamily:"futurastd-condensed-webfont"},
      	textAlign:'center',
      	width:'auto'
      });
       
      win.add(label);
       
      // open tab group
      win.open();
      
      

      Steps to Repro

      1. Run the attached test case for Mobile Web using SDK 3.3.0.GA

      Expected Result

      The app will display a label with custom font

      Actual Result

      The app will not display a label with custom font in SDK 3.3.0 but if the test is run with 3.2.3.GA will be displayed correctly.

        Attachments

          Activity

            People

            • Assignee:
              cbarber Chris Barber
              Reporter:
              mrahman Mostafizur Rahman
              Tester:
              Dustin Hyde
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration