fast/forms/text-control-intrinsic-widths.html fails on Mac if Word/Office fonts are installed Several metrics will be off, including Arial. The fix is to remove /Library/Fonts/Microsoft/ I think you have to restart the ATSServer to get any application to notice. (I used sudo killall ATSServer)
*** Bug 68919 has been marked as a duplicate of this bug. ***
Created attachment 108948 [details] Non-working patch Attaching some hacking here, but this doesn't work. Apparently there is no way to disable fonts for just one process on Mac.
Maybe the scripts should just tell users to disable the fonts themselves?
WebKit learns of available fonts only through NSFontManager and through AppKit’s and Core Text’s default fallback lists. I think that the latter would never include user-installed fonts, so for the purposes of this bug, I believe that DumpRenderTree can swizzle a handful of NSFontManager methods to filter out undesirable families and fonts.
Created attachment 109321 [details] Patch
Comment on attachment 109321 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=109321&action=review > Tools/DumpRenderTree/mac/DumpRenderTree.mm:224 > +static NSSet* allowedFontFamilySet() The space should go before the star. > Tools/DumpRenderTree/mac/DumpRenderTree.mm:226 > + static NSSet* fontFamiliySet = [[NSSet setWithObjects: Ditto. > Tools/DumpRenderTree/mac/DumpRenderTree.mm:347 > + One blank line is enough. > Tools/DumpRenderTree/mac/DumpRenderTree.mm:372 > + NSArray* fontsForFamily = [[NSFontManager sharedFontManager] availableMembersOfFontFamily:fontFamily]; The space should go before the start. > Tools/DumpRenderTree/mac/DumpRenderTree.mm:373 > + for (NSArray* fontInfo in fontsForFamily) { The space should go before the star. > Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:34 > +static NSSet* allowedFontFamilySet() The space should go before the star. > Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:36 > + static NSSet* fontFamiliySet = [[NSSet setWithObjects: Ditto. > Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:157 > + One blank line is enough. > Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:182 > + NSArray* fontsForFamily = [[NSFontManager sharedFontManager] availableMembersOfFontFamily:fontFamily]; The space should go before the star. > Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:183 > + for (NSArray* fontInfo in fontsForFamily) { Ditto.
http://trac.webkit.org/changeset/96434
This wasn't effective at fixing fast/forms/text-control-intrinsic-widths.html as of OS X Yosemite - fonts in /Library/Fonts/Microsoft took precedence over ones in /Library/Fonts. Additionally, fallback did include /Library/Fonts/Microsoft fonts. I re-fixed the first issue in bug 142720.