Unable to apply Helvetica Neue Light Font family on button text in android

Omer.7911Omer.7911 USMember ✭✭

I have applied button attributes as shown below in xamarin forms. It works fine on iOS but creating problem on android.

        Button anyButton = new Button ();
        anyButton.Text = "Men";
        anyButton.FontFamily = "HelveticaNeue-Light" ;
        anyButton.FontSize = 16;
        anyButton.TextColor = Color.Black;
        anyButton.FontAttributes = FontAttributes.None;

Screen shots of the same view having same attributes are attached. Button text looks bold a bit in android as compared to iOS.
I have tried by creating button renderer for Android and given attributes as

        Typeface fontStyle = Typeface.Create("HelveticaNeue-Light", TypefaceStyle.Normal);
        Control.SetTextSize(Android.Util.ComplexUnitType.Sp, 16);
        Control.Typeface = fontStyle;

But still facing the issue cannot apply "light" font on button's text in android.

Sign In or Register to comment.