Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
When targeting WP 8.1, if you specify custom font which is included as Content in the project, the calculated height of the Button is incorrect (41 pixels). Since the height is set explicitly by Xamarin.Forms it seems that it doesn't take into account that the font loads asynchronously and doesn't update the height when the font loads. Entry exhibits the same behavior.
Also, if I create a button with the custom font in the main page of the WinPhone project and then put LoadApplication(new MobileListViewApp.App()) in its click handler, the heights are correct.
Currently I haven't found a workaround for this (will use one if you point it out until you fix it), but this is preventing me to go further with my project.
This works correctly when targeting WP 8.0 (the default).
I really need a workaround/fix for this!
Created attachment 10812 [details]
A sample project for repo
It looks like there was a slight error in the XAML in the ResourceDictionary.
> <OnPlatform.WinPhone>./Assets/Fonts/RopaSansTIDITPTT-Light-Fixed.otf#Ropa Sans TIDIT PTT Light</OnPlatform.WinPhone>
> <OnPlatform.WinPhone>./Assets/Fonts/RopaSansTIDITPTT-Regular-Fixed.otf#Ropa Sans TIDIT PTT</OnPlatform.WinPhone>
> <OnPlatform.WinPhone>\Assets\Fonts\RopaSansTIDITPTT-Light-Fixed.otf#Ropa Sans TIDIT PTT Light</OnPlatform.WinPhone>
> <OnPlatform.WinPhone>\Assets\Fonts\RopaSansTIDITPTT-Regular-Fixed.otf#Ropa Sans TIDIT PTT</OnPlatform.WinPhone>
So using the Windfows backslash as the directory separator and removing the initial period, as per our docs on custom fonts:
F**k me! This was a case of RTFM it seems.
I apologize, I assumed that if this worked on a native WP app, it will work on Xamarin, but I was wrong. It seems that you do some font processing of your own.
A suggestion - it would be nice to add an explicit comment on this on the docs - I just read it diagonally and assumed I was supposed to pass a path valid for WP, not a special one and never paid attention to the code snippet itself. And when my path worked on WP 8 I assumed it would work on 8.1 also. It never occurred to me there was a gotcha there.
Thanks for the support!