зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
996a2cafe4
Коммит
ef98726246
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче