[iOS 26 Simulator] Bundled MauiFont registered twice at launch — GSFont "<name>" already exists / failed 305
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 290
Description
### Description
On iOS 26+ simulator with .NET 10 MAUI, bundled custom fonts emit a `GSFont` "already exists" warning followed by `GSFontRegisterCGFont(...) failed 305` at app launch. Fonts render correctly — cosmetic, but pollutes launch logs in every iOS sim run.
```
GSFont: "OpenSans-Regular" already exists.
GSFontRegisterCGFont() failed 305
```
### Steps to Reproduce
1. `dotnet new maui` (or any .NET 10 MAUI project that uses the default `` glob).
2. Run on **iOS 26.x simulator**.
3. Inspect launch logs.
### Evidence pointing upstream of MAUI's font pipeline
- **Asymmetric collision:** in my project, only `OpenSans-Regular.ttf` (PostScript name `OpenSans-Regular`) triggers the warning. The sibling `OpenSans-Semibold.ttf` (PostScript name `OpenSans-SemiBold`) does not. If MAUI's build pipeline were double-writing `UIAppFonts`, both should warn.
- **MAUI pipeline writes once:** `Microsoft.Maui.Resizetizer 10.0.20` `ProcessMauiFonts` target ([After.targets#L519-555](https://github.com/dotnet/maui/blob/main/src/SingleProject/Resizetizer/src/targets/Microsoft.Maui.Resizetizer.After.targets)) copies each font once, adds it as `BundleResource` once, and calls `CreatePartialInfoPlistTask` once with `CustomFonts="@(_MauiFontCopied)"`. No duplicate write path.
- **Source `Info.plist` has no manual `UIAppFonts`:** confirmed in my project — only the auto-generated partial plist contributes entries.
- **Removing the explicit `fonts.AddFont(...)` call in `MauiProgram.cs` does not change the warning** — `AddFont` only populates the managed `IFontRegistrar` alias map; it doesn't call `CTFontManagerRegisterFontsForURL`.
- **Same pattern reported in an unrelated MAUI 10 iOS app** in [#33294](https://github.com/dotnet/maui/issues/33294) (see the early-comment log dump showing `GSFont: "RobotoMono-Regular" already exists` / `failed 305`). Not specific to one font.
### Environment
- .NET 10 (`net10.0-ios`), `Microsoft.Maui.Controls 10.0.50`, `Microsoft.Maui.Resizetizer 10.0.20`
- iOS 26.x Simulator, Xcode 26.x
- macOS host
### Asks
- Confirm whether this is a known iOS-26-platform behavior change that benignly emits the warning for any custom font listed in `UIAppFonts`, or whether MAUI's iOS build/runtime is contributing a second registration path.
- If it's a benign iOS 26 platform warning, would it be possible to silence or filter it during MAUI's iOS launch sequence?
Happy to provide a minimal repro on request.
Contributor guide
Research direction
Run the minimal .NET 10 MAUI repro on an iOS 26.x simulator and inspect the launch logs. Start with Microsoft.Maui.Resizetizer.After.targets lines 519-555 and the generated partial plist, then compare that path with the iOS launch registration behavior. Done means determining whether registration occurs twice in MAUI or is an iOS warning, and documenting or applying the appropriate resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, ios
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100