Bug 1744135 Part 4: Avoid implicit int conversion for font names. r=jfkthame

Differential Revision: https://phabricator.services.mozilla.com/D134963
This commit is contained in:
Brad Werth 2022-01-03 19:20:21 +00:00
Родитель 996a2cafe4
Коммит ef98726246
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -390,13 +390,13 @@ CGFontRef MacOSFontEntry::CreateOrCopyFontRef() {
::CGFontRetain(mFontRef);
return mFontRef;
}
CrashReporter::AutoAnnotateCrashReport autoFontName(CrashReporter::Annotation::FontName, mName);
// Create a new CGFont; caller will own the only reference to it.
NSString* psname = GetNSStringForString(NS_ConvertUTF8toUTF16(mName));
CGFontRef ref = CGFontCreateWithFontName(CFStringRef(psname));
if (!ref) {
CrashReporter::AutoAnnotateCrashReport autoFontName(CrashReporter::Annotation::FontName,
psname);
// This happens on macOS 10.12 for font entry names that start with
// .AppleSystemUIFont. For those fonts, we need to go through NSFont
// to get the correct CGFontRef.