REGRESSION(r241288): Text on Yahoo Japan mobile looks too bold
Created attachment 374741 [details] Patch
<rdar://problem/50912757>
Comment on attachment 374741 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=374741&action=review > Source/WTF/wtf/Platform.h:1619 > +#if (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000) || (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 60000) || (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 130000) > +#define USE_HIRAGINO_SANS_WORKAROUND 1 > +#endif Seems wrong for something so specific to be in Platform.h > Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:1156 > + // This is yucky code, but it's necessary for yahoo.co.jp. > + // FIXME: https://bugs.webkit.org/show_bug.cgi?id=200047 Remove this code. Should this then be a Quirk?
> Seems wrong for something so specific to be in Platform.h What would you suggest? My understanding is that Platform.h is exactly where such things need to be. Seems like we want to be checking for PLATFORM(IOS) not PLATFORM(IOS_FAMILY) here.
Comment on attachment 374741 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=374741&action=review >> Source/WTF/wtf/Platform.h:1619 >> +#endif > > Seems wrong for something so specific to be in Platform.h Would this stay in the tree in perpetuity? When would we know that we can remove it?
Hooking this up to a quirk appears to be fairly difficult, since control flows through a singleton FontDatabase object which owns all the CTFonts. Instead, I'll try to modify the request rather than modify the font object.
Created attachment 375139 [details] Patch
Created attachment 375144 [details] Patch
Comment on attachment 375144 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=375144&action=review > Source/WebCore/page/Quirks.cpp:396 > + // FIXME: https://bugs.webkit.org/show_bug.cgi?id=200047 Remove this quirk. Nicer to use webkit.org/b/200047
Committed r248018: <https://trac.webkit.org/changeset/248018>