Bug 26976 - Font and FontSize do not render the same font size
Summary: Font and FontSize do not render the same font size
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.4
Hardware: PC Windows
: --- minor
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-02-11 18:16 UTC by Jon Douglas [MSFT]
Modified: 2015-03-10 05:54 UTC (History)
4 users (show)

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

Screenshot (115.29 KB, image/png)
2015-02-11 18:17 UTC, Jon Douglas [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 Jon Douglas [MSFT] 2015-02-11 18:16:35 UTC

I know that Font is now technically obsolete in Xamarin.Forms, but it seems that Font and FontSize actually will render different sizes between the two. Attached is a screenshot and sample reproduction to show the differences. 


Because of this, I would consider it a regression for users who had an older Forms app < 1.3 to which when they upgrade will have different FontSizes.
Comment 1 Jon Douglas [MSFT] 2015-02-11 18:17:57 UTC
Created attachment 9781 [details]
Comment 2 Jon Douglas [MSFT] 2015-02-11 18:22:06 UTC

Using Font as a method of size has now been replaced with FontSize(http://developer.xamarin.com/guides/cross-platform/xamarin-forms/working-with/fonts/), however here's a little clarification on the description above via an example:

Font = "Small"


FontSize = "Small"

Will not render the same font size.

Example project:

Comment 3 Jason Smith [MSFT] 2015-02-12 12:51:06 UTC
This is expected behavior. FontSize in the original Font struct presented some consistency issues which were part of hte reason it was deprecated. NamedSize gained a default property and now adapts it correctly based on the type it is used on.

That said the original Font struct retains the original behavior because to not do so would have been a breaking change.
Comment 4 Paul Diston 2015-03-10 05:54:00 UTC
Although this is expected behaviour, with regard to breaking changes, it is a breaking change moving from Font to FontSize.