Title: [194349] branches/safari-601.1.46-branch/Source/WebCore
- Revision
- 194349
- Author
- [email protected]
- Date
- 2015-12-21 14:25:57 -0800 (Mon, 21 Dec 2015)
Log Message
Merged r188802. rdar://problem/23978917
Modified Paths
Diff
Modified: branches/safari-601.1.46-branch/Source/WebCore/ChangeLog (194348 => 194349)
--- branches/safari-601.1.46-branch/Source/WebCore/ChangeLog 2015-12-21 22:22:58 UTC (rev 194348)
+++ branches/safari-601.1.46-branch/Source/WebCore/ChangeLog 2015-12-21 22:25:57 UTC (rev 194349)
@@ -1,3 +1,23 @@
+2015-12-21 Babak Shafiei <[email protected]>
+
+ Merge r188802.
+
+ 2015-08-21 Myles C. Maxfield <[email protected]>
+
+ [OS X] Remove dead code from FontCache::systemFallbackForCharacters()
+ https://bugs.webkit.org/show_bug.cgi?id=148218
+
+ Reviewed by Daniel Bates.
+
+ lookupCTFont() in FontCacheMac.mm will always return the best font (because
+ CTFontCreateForCharactersWithLanguage() does so). Also, all fonts that will
+ be created on WebKit's behalf are already printer fonts.
+
+ No new tests because there is no behavior change.
+
+ * platform/graphics/mac/FontCacheMac.mm:
+ (WebCore::FontCache::systemFallbackForCharacters): Deleted.
+
2015-12-18 Matthew Hanson <[email protected]>
Merge r194206. rdar://problem/23824469
Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/mac/FontCacheMac.mm (194348 => 194349)
--- branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/mac/FontCacheMac.mm 2015-12-21 22:22:58 UTC (rev 194348)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/mac/FontCacheMac.mm 2015-12-21 22:25:57 UTC (rev 194349)
@@ -523,17 +523,10 @@
// font pointer.
NSFont *substituteFont = reinterpret_cast<NSFont *>(const_cast<__CTFont*>(fallbackDedupSet().add(result).iterator->get()));
- // Use the family name from the AppKit-supplied substitute font, requesting the
- // traits, weight, and size we want. One way this does better than the original
- // AppKit request is that it takes synthetic bold and oblique into account.
- // But it does create the possibility that we could end up with a font that
- // doesn't actually cover the characters we need.
-
NSFontManager *fontManager = [NSFontManager sharedFontManager];
NSFontTraitMask traits = 0;
NSInteger weight;
- CGFloat size;
if (nsFont) {
if (description.italic())
@@ -543,32 +536,15 @@
if (platformData.m_syntheticOblique)
traits |= NSFontItalicTrait;
weight = [fontManager weightOfFont:nsFont];
- size = [nsFont pointSize];
} else {
- // For custom fonts nsFont is nil.
+ ASSERT(!CORETEXT_WEB_FONTS);
traits = description.italic() ? NSFontItalicTrait : 0;
weight = toAppKitFontWeight(description.weight());
- size = description.computedPixelSize();
}
NSFontTraitMask substituteFontTraits = [fontManager traitsOfFont:substituteFont];
NSInteger substituteFontWeight = [fontManager weightOfFont:substituteFont];
- if (traits != substituteFontTraits || weight != substituteFontWeight || !nsFont) {
- if (NSFont *bestVariation = [fontManager fontWithFamily:[substituteFont familyName] traits:traits weight:weight size:size]) {
- UChar32 character;
- U16_GET(characters, 0, 0, length, character);
- if (!nsFont || (([fontManager traitsOfFont:bestVariation] != substituteFontTraits || [fontManager weightOfFont:bestVariation] != substituteFontWeight)
- && [[bestVariation coveredCharacterSet] longCharacterIsMember:character]))
- substituteFont = bestVariation;
- }
- }
-
- substituteFont = [substituteFont printerFont];
-
- substituteFontTraits = [fontManager traitsOfFont:substituteFont];
- substituteFontWeight = [fontManager weightOfFont:substituteFont];
-
FontPlatformData alternateFont(reinterpret_cast<CTFontRef>(substituteFont), platformData.size(),
!isPlatformFont && isAppKitFontWeightBold(weight) && !isAppKitFontWeightBold(substituteFontWeight),
!isPlatformFont && (traits & NSFontItalicTrait) && !(substituteFontTraits & NSFontItalicTrait),
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes