-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix deprecated API usage for embedded fonts on iOS/Catalyst 18.0+ #25025
Fix deprecated API usage for embedded fonts on iOS/Catalyst 18.0+ #25025
Conversation
I think this should target to net9 when we merge the #25017 |
/rebase |
7cff256
to
4b9e5e3
Compare
Net9 is on iOS18 XCODE16 can we target that branch ? |
I think this is fine for main so that if anyone is on XCODE 16 locally they are still able to compile main until we merge net9.0 into main |
/backport to net9.0 |
Started backporting to net9.0: https://github.com/dotnet/maui/actions/runs/11148029710 |
@PureWeen backporting to net9.0 failed, the patch most likely resulted in conflicts: $ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Fix deprecated API usage for embedded fonts on iOS/Catalyst
.git/rebase-apply/patch:41: trailing whitespace.
warning: 1 line adds whitespace errors.
Using index info to reconstruct a base tree...
M src/Core/src/Fonts/EmbeddedFontLoader.iOS.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Core/src/Fonts/EmbeddedFontLoader.iOS.cs
CONFLICT (content): Merge conflict in src/Core/src/Fonts/EmbeddedFontLoader.iOS.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Fix deprecated API usage for embedded fonts on iOS/Catalyst
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
@PureWeen an error occurred while backporting to net9.0, please check the run log for details! Error: git am failed, most likely due to a merge conflict. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't merge until
#25055
is green and merged
Description of Change
CTFontManager.RegisterGraphicsFont
throws a deprecation warning for iOS 18+. This was breaking my build.https://github.com/xamarin/xamarin-macios/blob/main/src/CoreText/CTFontManager.cs#L445-L462
This PR attempts to change it to a supported API for these platforms, using
CTFontManager.RegisterFontsForUrl
. To do this, I believe, we need to write the font to a file on disk (in this case, in temp storage in the users application cache) and then register it.