WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
35273
fast/forms/text-control-intrinsic-widths.html fails on Mac if Word/Office fonts are installed
https://bugs.webkit.org/show_bug.cgi?id=35273
Summary
fast/forms/text-control-intrinsic-widths.html fails on Mac if Word/Office fon...
Eric Seidel (no email)
Reported
2010-02-22 16:45:38 PST
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)
Attachments
Non-working patch
(5.26 KB, patch)
2011-09-27 18:52 PDT
,
Simon Fraser (smfr)
no flags
Details
Formatted Diff
Diff
Patch
(16.07 KB, patch)
2011-09-30 12:06 PDT
,
Simon Fraser (smfr)
mitz: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Simon Fraser (smfr)
Comment 1
2011-09-27 17:36:06 PDT
***
Bug 68919
has been marked as a duplicate of this bug. ***
Simon Fraser (smfr)
Comment 2
2011-09-27 18:52:55 PDT
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.
Simon Fraser (smfr)
Comment 3
2011-09-27 18:53:18 PDT
Maybe the scripts should just tell users to disable the fonts themselves?
mitz
Comment 4
2011-09-27 19:01:37 PDT
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.
Simon Fraser (smfr)
Comment 5
2011-09-30 12:06:09 PDT
Created
attachment 109321
[details]
Patch
mitz
Comment 6
2011-09-30 12:21:23 PDT
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.
Simon Fraser (smfr)
Comment 7
2011-09-30 15:56:43 PDT
http://trac.webkit.org/changeset/96434
Alexey Proskuryakov
Comment 8
2015-03-18 23:09:55 PDT
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
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug