Big Sur does not like app local custom fonts

As a font publisher, most of my apps use custom fonts, either local to the app, or available system wide.

I use FontActivateMBS and it works great to activate fonts for all other apps.

However, in Big Sur, the option FontActivateMBS(True) which activates the font for the app only simply no longer works.

I don’t think it is that plugin issue, though. ATSApplicationFontsPath in info.plist does not work either.

I found this article here.

In summary suggestions include.

  • Making sure Fonts are in a subfolder called Fonts of the Resources folder.
  • Do not use “/” in the ATSApplicationFontsPath.
  • Do not include the file extension of the font, just the name i.e. “myGreatFont”.

I currently don’t have an application set-up to activate fonts so I haven’t tested any of the above.

2 Likes

FontActivateMBS was updated a few months back to use CoreText functions.
Also you may tell us what error code is returned.

I tested it here.

When I do FontActivateMBS in App open, I get return value 0 (no error).
Then I use the font in text area and it works for me on Big Sur.

FontActivateMBS(False) works just fine.

It is FontActivateMBS(True) which does not do anything. And I get error 0 for each font, but it simply does not do anything. Fonts are not activated.

I tested that as well. This is what I used to do before I switched fo FontActivateMBS(). Unfortunately, it no longer works as well :frowning:

I found the issue!

In my app, I use an HTMLViewer to display a sample of the font.

It happens so that now, the local font is not made available to the HTMLViewer content.

Hence I did not see the locally activated fonts.

Now I will have to refactor the app to use something else than an HTMLViewer to display a demo of the font…

1 Like

The “new” Web view that Apple uses is really gimped, even when you do all the tricks to re-enable stuff. This is you know, for “Security”.