Xamarin IOS app font not displaying after published to app store

jwww 1 Reputation point
2021-04-30T07:28:11.557+00:00

I was wondering what could have gone wrong with this build that I deployed.

Referring to the image, on the left side is the simulator, the right side is the actual app image.
The text is missing on the actual app.
Has anyone faces this issue before?

92746-tester.jpg

As you can see the location (last row) of the grid is displaying the text and as for first and second was not.

92748-tester3.png

Besides that, I checked if (Resources -> Montserratt-Medium.tff) build action was under Bundle Resources and Montseratt-Medium was added in info.plist. Both of them exist.

92865-tester2.png

At this point I have no idea where to tackle this issue because the build I have works perfectly fine during debugging and the deployed version completely opposite of what I expected.

Developer technologies | .NET | Xamarin
{count} votes

2 answers

Sort by: Most helpful
  1. JarvanZhang 23,971 Reputation points
    2021-04-30T09:52:49.317+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    Do you place the font file under the Resources folder of the iOS project? To use custom fonts in Xamarin.Forms, you could just add the font file to shared project and consumed by platform projects without any additional work.

    The process for accomplishing:
    1.Add the font to your Xamarin.Forms shared project as an embedded resource (Build Action: EmbeddedResource).
    2.Register the font file with the assembly, in a file such as AssemblyInfo.cs, using the ExportFont attribute. An optional alias can also be specified.

       using Xamarin.Forms;  
    
       [assembly: ExportFont("Lobster-Regular.ttf", Alias = "Lobster")]  
    

    Check the doc: https://learn.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/text/fonts#set-the-font-family
    Best Regards,

    Jarvan Zhang


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. jwww 1 Reputation point
    2021-05-08T03:25:14.53+00:00

    Sorry to for the late update guys, as I dig deeper the issues doesn't relate to font at all but binding context and I'm going to close this question as the issue is starting to become irrelevant to the the topic itself. Appreciate for the up-coming help.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.