Core Text has code paths that call into CGFontCreateFontsWithPath() directly, bypassing CGās font database. This can and does (in TOT WebKit, for example) result in multiple distinct CGFont objects being created for the exact same font. See <rdar://problem/9089228>for details. Every time we get a new and distinct CGFontRef, we create a new FontCache entry and abandon the old one. The cache fails to find the earlier entry due to FontPlatformData::platformIsEqual() in FontPlatformDataCocoa.mm comparing the saved m_cfFont.
Created attachment 95189 [details] Patch to only compare the CGFontRefs if needed
<rdar://problem/9515696>
Comment on attachment 95189 [details] Patch to only compare the CGFontRefs if needed View in context: https://bugs.webkit.org/attachment.cgi?id=95189&action=review > Source/WebCore/ChangeLog:9 > + Change the platformIsEqual to just compare the m_font members if > + both are not null. This doesn't match the code change. We compare the m_font members if either one is not null, not if both are not null.
Comment on attachment 95189 [details] Patch to only compare the CGFontRefs if needed r=me
Committed r87524: <http://trac.webkit.org/changeset/87524>