Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24299] Universal Windows App (UWP): Unable to render different fonts

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-01-23T06:06:06.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.1.0
ComponentsWindows, Windows phone
Labelseng-priority
ReporterNeeraj Mishra
AssigneeGary Mathews
Created2017-01-11T22:07:44.000+0000
Updated2017-02-03T00:13:28.000+0000

Description

Issue:

Tried different combinations in the fontFamily field in the tss (shown in the sample project) and none of them work. App can be downloaded from : https://propelics.box.com/s/sznwb7l7t19gcl7wpmksz1qkz2qisqbk

REPRODUCE

1. Create a simple app like attached : [https://propelics.box.com/s/sznwb7l7t19gcl7wpmksz1qkz2qisqbk] 2. Run it on Windows. 3. You will not see the expected fonts at app launch.

ACTUAL RESULT

Fonts are not shows as set in tss file for different labels.

EXPECTED RESULT

The labels should be displayed with fonts set in the tss.

Note:

Tried placing the font files in both: - app/assets/windows and - app/assets/windows/fonts but nothing worked.

Attachments

FileDateSize
6.0.0.GA.PNG2017-01-26T23:31:08.000+000019834
6.1.0.v20170126143826.PNG2017-01-26T23:31:08.000+000021277
fonts.zip2017-01-20T22:28:38.000+00001055460

Comments

  1. Gary Mathews 2017-01-20

    master: https://github.com/appcelerator/titanium_mobile_windows/pull/930
  2. Kota Iguchi 2017-01-23

    Fixed, can be done by specifying font file name explicitly.
       var win = Ti.UI.createWindow({
               backgroundColor: 'gray',
               layout: 'vertical'
           });
       
       win.add(Ti.UI.createLabel({
           text: 'Hello World, Bold',
           font: {
               fontSize: 36,
               fontFamily: 'segoeuib.ttf#Segoe UI 8'
           }
       }));
       
       win.add(Ti.UI.createLabel({
           text: 'Hello World, Italic',
           font: {
               fontSize: 36,
               fontFamily: 'segoeuii.ttf#Segoe UI 8'
           }
       }));
       
       win.add(Ti.UI.createLabel({
           text: 'Hello World, Light',
           font: {
               fontSize: 36,
               fontFamily: 'segoeuil.ttf#Segoe UI 8'
           }
       }));
       
       win.open();
       
    *TODO*: Update docs http://docs.appcelerator.com/platform/latest/#!/api/Font
  3. Samir Mohammed 2017-01-26

    Verified fix with the test code provided by [~gmathews] in https://github.com/appcelerator/titanium_mobile_windows/pull/930. Was able to see different fonts being rendered on the latest build on the 6.1.0. SDK. Before : *6.0.0.GA* !6.0.0.GA.PNG|thumbnail! After: *6.1.0.v20170126143826* !6.1.0.v20170126143826.PNG|thumbnail! *Environment*
       Lumia 640 LTE (RM-1073) (OS Build 10.0.14393.693)
       Mobile emulator 10.0.14393.0 1080p 6inch 2gb
       Operating System
       Name                        = Microsoft Windows 10 Pro
       Version                     = 10.0.14393
       Architecture                = 64bit
       

    CPUs = 4

    Memory = 17034395648 Node.js Node.js Version = 4.6.0 npm Version = 2.11.3 Titanium SDK SDK Version = 6.1.0.v20170126143826

JSON Source