title: XAMARIN: cross platform FontFamily
body: <p>I need to specify different FontFamily for different Labels in my app. I need to use the default fonts (e.g. Roboto for Android and Helvetica for iOS) with their modifications (e.g. Light, Medium, Bold). As far as I understand I should be using Roboto-Light and Helvetica-Light to get the Light version of the fonts (same for Medium and Bold). 
  In addition to this requirement I need to set the fonts in XAML (like <a href="https://developer.xamarin.com/guides/cross-platform/xamarin-forms/working-with/fonts/" rel="nofollow noreferrer">described in documentation</a>) so I end up with this code</p>
  
  <pre><code>&lt;StackLayout BackgroundColor="#F8F8F8" Padding="0, 20, 0, 0"&gt;
  &lt;Label Text="Black" TextColor="#000000" &gt;
    &lt;Label.FontSize&gt;
      &lt;OnPlatform x:TypeArguments="x:Double"
                  iOS="17"
                  Android="16"
                  WinPhone="16" /&gt;
    &lt;/Label.FontSize&gt;
    &lt;Label.FontFamily&gt;
      &lt;OnPlatform x:TypeArguments="x:String"&gt;
        &lt;OnPlatform.iOS&gt;Helvetica-Black&lt;/OnPlatform.iOS&gt;
        &lt;OnPlatform.Android&gt;Roboto-Black&lt;/OnPlatform.Android&gt;
        &lt;OnPlatform.WinPhone&gt;&lt;/OnPlatform.WinPhone&gt;
      &lt;/OnPlatform&gt;
    &lt;/Label.FontFamily&gt;
  &lt;/Label&gt;
  &lt;Label Text="Light" TextColor="#000000"&gt;
    &lt;Label.FontSize&gt;
      &lt;OnPlatform x:TypeArguments="x:Double"
                  iOS="17"
                  Android="16"
                  WinPhone="16" /&gt;
    &lt;/Label.FontSize&gt;
    &lt;Label.FontFamily&gt;
      &lt;OnPlatform x:TypeArguments="x:String"&gt;
        &lt;OnPlatform.iOS&gt;Helvetica-Light&lt;/OnPlatform.iOS&gt;
        &lt;OnPlatform.Android&gt;Roboto-Light&lt;/OnPlatform.Android&gt;
        &lt;OnPlatform.WinPhone&gt;&lt;/OnPlatform.WinPhone&gt;
      &lt;/OnPlatform&gt;
    &lt;/Label.FontFamily&gt;
  &lt;/Label&gt;
  &lt;Label Text="Medium" TextColor="#000000" &gt;
    &lt;Label.FontSize&gt;
      &lt;OnPlatform x:TypeArguments="x:Double"
                  iOS="17"
                  Android="16"
                  WinPhone="16" /&gt;
    &lt;/Label.FontSize&gt;
    &lt;Label.FontFamily&gt;
      &lt;OnPlatform x:TypeArguments="x:String"&gt;
        &lt;OnPlatform.iOS&gt;Helvetica-Medium&lt;/OnPlatform.iOS&gt;
        &lt;OnPlatform.Android&gt;Roboto-Medium&lt;/OnPlatform.Android&gt;
        &lt;OnPlatform.WinPhone&gt;&lt;/OnPlatform.WinPhone&gt;
      &lt;/OnPlatform&gt;
    &lt;/Label.FontFamily&gt;
  &lt;/Label&gt;
  &lt;Label Text="Bold"  TextColor="#000000"&gt;
    &lt;Label.FontSize&gt;
      &lt;OnPlatform x:TypeArguments="x:Double"
                  iOS="17"
                  Android="16"
                  WinPhone="16" /&gt;
    &lt;/Label.FontSize&gt;
    &lt;Label.FontFamily&gt;
      &lt;OnPlatform x:TypeArguments="x:String"&gt;
        &lt;OnPlatform.iOS&gt;Helvetica-Bold&lt;/OnPlatform.iOS&gt;
        &lt;OnPlatform.Android&gt;Roboto-Bold&lt;/OnPlatform.Android&gt;
        &lt;OnPlatform.WinPhone&gt;&lt;/OnPlatform.WinPhone&gt;
      &lt;/OnPlatform&gt;
    &lt;/Label.FontFamily&gt;
  &lt;/Label&gt;
  </code></pre>
  
  <p></p>
  
  <p>However, the result in Android is unexpected. The FontFamily of the different Labels is not changed. They all look the same. </p>
  
  <p><a href="https://i.stack.imgur.com/oCq4j.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oCq4j.png" alt="Android"></a></p>
  
  <p>The same code in iOS works as expected </p>
  
  <p><a href="https://i.stack.imgur.com/jcnGI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jcnGI.png" alt="enter image description here"></a></p>
  
  <p>My question is: How to get the <strong>Roboto-Light</strong>, <strong>Roboto-Medium</strong> and <strong>Roboto-Bold</strong> fonts in my Android app if following XAMARIN documentation does not work?</p>