[OS X] Glyph spacing for system fonts may be incorrect
Created attachment 229852 [details] Patch
Attachment 229852 [details] did not pass style-queue: ERROR: Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm:376: Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side. [whitespace/operators] [4] Total errors found: 1 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
<rdar://problem/16559521>
Style check is a false negative, though I don't think it's feasible to fix the checker scripts because there are preprocessor macros at play here.
Comment on attachment 229852 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=229852&action=review > Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm:378 > + if ( > +#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 > + !CTFontDescriptorIsSystemUIFont(descriptor.get()) && > +#endif > + (horizontal || m_isBrokenIdeographFallback)) { I don't know the performance implications, but could you switch to have the ALWAYS test first? That will make the style bot happy.
Created attachment 229907 [details] Patch
Comment on attachment 229907 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=229907&action=review > Source/WebCore/ChangeLog:11 > + (WebCore::SimpleFontData::platformWidthForGlyph): Update to use CTFontGetAdvancesForGlyphs() for system fonts You don't explain the horizontal ? kCTFontHorizontalOrientation : kCTFontVerticalOrientation change. > Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm:384 > + if ((horizontal || m_isBrokenIdeographFallback) && !hasCustomTracking(m_platformData.ctFont())) { So much better!
http://trac.webkit.org/changeset/167679
Reopening to attach new patch.
Created attachment 229912 [details] Patch