-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Get the correct iOS system font for each weight #48937
Conversation
This reverts commit 47caba5.
ASSERT_EQ(dynamic_font_manager.font_provider() | ||
.MatchFamily("CupertinoSystemDisplay") | ||
->count(), | ||
9); |
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.
When I run this locally I'm seeing a size of 10 instead of 9
(8 values from 0 through 700, plus the extra 780 and 810 weights)
…140990) flutter/engine@b2a9ce8...0bbb4d6 2024-01-04 58190796+MitchellGoodwin@users.noreply.github.com Get the correct iOS system font for each weight (flutter/engine#48937) 2024-01-04 43054281+camsim99@users.noreply.github.com [Android] Re-land "Re-land 'Add target to have linux_android_emulator_tests run on AVDs with Android 33 & 34'" (flutter/engine#49101) 2024-01-04 godofredoc@google.com Use Mac M1s or x86 wherever possible. (flutter/engine#49540) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
|
||
return CTFontCreateCopyWithAttributes(ct_font, size, nullptr, var_font_desc); | ||
} | ||
|
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.
I was profiling allocations - and this seems to be leaking the CFNumber
s, CFMutableDictionary
and CTFontDescriptor
. I don't see CFRelease calls anywhere? I don't think there's a ScopedCFTypeRef
in fml so this will need to be released manually.
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.
@knopp could you file an issue for that so it doesn't get lost?
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.
I think this has been already fixed when clang tidy started complaining about missing CFRelease.
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.
Do you know which release will contain the memory leak fix?
See flutter/issue/139689 and flutter/issue/132475
Registers all of the possible font weight values for "CupertinoSystemDisplay". The registering of "CupertinoSystemText" was removed, as the fallback will correctly show the right fonts, and this logic does not work for the smaller font due to Apple APIs removing the font weight.
The font weights for 800 and 900 had to be added outside of the loop as they were coming back with values different from what was being put in.
Before:
After:
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.