Bug 31017 - Style FontSize not working when using custom font
Summary: Style FontSize not working when using custom font
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.4.2
Hardware: PC Mac OS
: Normal minor
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-06-11 09:04 UTC by John Miller [MSFT]
Modified: 2016-04-10 00:02 UTC (History)
5 users (show)

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

Test Case (364.06 KB, application/zip)
2015-06-11 09:04 UTC, John Miller [MSFT]

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:

Description John Miller [MSFT] 2015-06-11 09:04:34 UTC
Created attachment 11569 [details]
Test Case


   A Label is not the correct FontSize when using a style that has a custom font defined.

**Steps to Reproduce:**

   1. Run the attached sample on iOS

**Actual Results:**

   There are four labels. The first two are not the correct font size. The second two are the correct size, only because it's explicitly set. 

**Expected Results:**

   The first two labels should inherit the FontSize from the Style defined in App.xaml.

**Build Date & Platform:**

   XF 1.4.2

**Additional Information:**

   It seems related to the Style using a custom font. If that font part of the style is removed, the expected results are shown.
Comment 1 Stephane Delcroix 2015-06-12 03:21:39 UTC
Please note that Font is a deprecated property and has been replaced by FontSize, FontFamily et FontAttributes.

if you change your BaseStyle from

			<Style x:Key="BaseLabelStyle" TargetType="Label">
				<Setter Property="Font" Value="SourceSansPro-Regular"/>


			<Style x:Key="BaseLabelStyle" TargetType="Label">
				<Setter Property="FontFamily" Value="SourceSansPro-Regular"/>

it works as expected