How to get web font when iOS is in Lockdown mode for Maui+Blazor?

An Liu 5 Reputation points
2023-08-28T20:10:03.44+00:00

We currently use Poppins as the font and bundle the "woff" files locally.

It works well in general mode.

But the URL in src doesn't work when the ios uses Lockdown mode.

How to get Poppin in Lockdown mode?User's image

https://support.apple.com/en-us/HT212650

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,376 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 63,746 Reputation points
    2023-08-28T21:45:40.7466667+00:00

    you would download and add the font to the Maui project as a resource. Then edit the Maui app to register the font. Then the Blazor CSS references the font by the installed name not as a web resource. You could also just use a fonts folder and reference locally.

    note: it is probably poor design to require an internet connection to display a Blazor page. I would not use any links that were not local resources.


Your answer

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