Skip to content

Commit

Permalink
Disable Warnings for RegisterGraphicsFont (#25092)
Browse files Browse the repository at this point in the history
  • Loading branch information
PureWeen authored Oct 4, 2024
1 parent 979ad02 commit e430b61
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Core/src/Fonts/EmbeddedFontLoader.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ public partial class EmbeddedFontLoader

var name = cgFont.PostScriptName;

#pragma warning disable CA1416 // TODO: 'RegisterGraphicsFont' is obsolete on: 'ios' 15.0 and later
#pragma warning disable CA1422
if (CTFontManager.RegisterGraphicsFont(cgFont, out var error))
return name;
#pragma warning restore CA1422
#pragma warning restore CA1416

var uiFont = UIFont.FromName(name, 10);
if (uiFont != null)
Expand Down

0 comments on commit e430b61

Please sign in to comment.