Bug 26599 - [iOS] Forms 1.3.2-pre2 breaks FontFamily()
Summary: [iOS] Forms 1.3.2-pre2 breaks FontFamily()
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.2
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-01-30 10:57 UTC by Dominic N [MSFT]
Modified: 2015-02-10 09:01 UTC (History)
7 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Sample project exhibiting bug (175.87 KB, application/zip)
2015-01-30 10:57 UTC, Dominic N [MSFT]
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Dominic N [MSFT] 2015-01-30 10:57:18 UTC
Created attachment 9580 [details]
Sample project exhibiting bug

## Overview

In moving from X.Forms 1.3.1 to 1.3.2-pre2, there seems to be a regression in iOS with FontFamily(). Whereas the following attribute on something such as a label would work in XF for iOS in 1.3.1, it no longer changes the font in 1.3.2-pre2:

FontFamily = "Courier"

The regression does not seem to be present in Forms.Android. I have created a new Forms app from template, targeted Xamarin.Forms 1.3.2-pre2, and attempted to change the label font using the FontFamily attribute. This project has been attached to the report.

## Steps to reproduce

1. Download the sample project
2. Build and run on iOS


## Expected results

Font changes to Courier.


## Actual results

Font does not change
Comment 1 jruskin 2015-01-31 14:45:05 UTC
It seems like FontExtensions.ToUIFont(this Label) and FontExtensions.ToUIFont(this Element) do not run the same underlying code as FontExtensions.ToUIFont(this Font).  As a workaround in the short term until this is fixed, you can create a custom LabelRenderer and call

if (this.Element != null && this.Element.Font != null && this.Control != null)
{
    this.Control.Font = this.Element.Font.ToUIFont();
}
Comment 2 Rajneesh Kumar 2015-02-02 05:53:06 UTC
I have checked this issue and able to reproduce this. To reproduce this issue I have followed the steps and instruction provided in bug description. 

I observed that with Xamarin. Forms Version: 1.3.2.6309-pre2, font does't change to Courier.
Here is the screencast for the same:http://www.screencast.com/t/dfOn0prTj

Additional Information: Getting same behaviour with Xamarin.Forms Version: 1.3.2.6313-pre3.
Environment Info:

Xamarin. Forms Version: 1.3.2.6309-pre2

=== Xamarin Studio ===

Version 5.7.1 (build 16)
Installation UUID: 011d70a5-dede-428b-ab04-ef451c2e539d
Runtime:
	Mono 3.12.0 ((detached/a813491)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000068

=== Apple Developer Tools ===

Xcode 6.1 (6604)
Build 6A1052d

=== Xamarin.iOS ===

Version: 8.6.1.20 (Business Edition)
Hash: 3b3ef43
Branch: 
Build date: 2015-01-24 09:42:21-0500

=== Xamarin.Android ===

Version: 4.20.0.28 (Business Edition)
Android SDK: /Users/MM/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin.Mac ===

Version: 1.12.0.4 (Business Edition)

=== Build Information ===

Release ID: 507010016
Git revision: f12fcaf4707ab436bee2df6263eb5333197b262c
Build date: 2015-02-01 21:06:05-05
Xamarin addins: f7b7d34419c9ec24501bfa7c658e80a6305613e0

=== Operating System ===

Mac OS X 10.9.5
Darwin MacMini.local 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 3 Jason Smith [MSFT] 2015-02-02 12:18:30 UTC
Fixed in 1.3.2 final and 1.3.3-pre1
Comment 4 Ram Chandra 2015-02-10 09:01:17 UTC
I have checked this issue with following builds:

Xamarin.Forms: 1.3.4.6325-pre1
Mac OS X 10.10.0
Xamarin Studio: 5.7.1 (build 17)
Mono 3.12.0 ((detached/a813491)
GTK+ 2.24.23 (Raleigh theme)
Package version: 312000068
Xcode 6.1 (6604)
Build 6A1052d
Xamarin.iOS : 8.6.1.20 (Business Edition)
=== Build Information ===
Release ID: 507010017
Git revision: 0bc7d3550b6b088ac25b08dcf7bbe73bcc8658b3
Build date: 2015-02-03 19:43:29-05
Xamarin addins: f7b7d34419c9ec24501bfa7c658e80a6305613e0

Observation: When I set the "FontFamily" property of label I observed that this property is also reflected in iOS application. I have checked following font family which is working fine on iOS.

Arial Black
Courier
Times New Roman

Screencast: http://www.screencast.com/t/ErBEWUPG9cg

This issue has been fixed. Hence I am closing this issue.