Summary: | [Freetype] Add support for the font-synthesis property | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Martin Robinson <mrobinson> | ||||||
Component: | WebKitGTK | Assignee: | Martin Robinson <mrobinson> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | commit-queue, mmaxfield | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Martin Robinson
2015-04-30 14:41:59 PDT
Created attachment 252090 [details]
Patch
Comment on attachment 252090 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=252090&action=review > Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp:331 > + if (fontDescription.italic() && fontDescription.fontSynthesis() & FontSynthesisStyle Why the difference in order between weight and italic? Comment on attachment 252090 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=252090&action=review >> Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp:331 >> + if (fontDescription.italic() && fontDescription.fontSynthesis() & FontSynthesisStyle > > Why the difference in order between weight and italic? No reason. I think I just did that for some intuitive sense of readability. I'm happy to make it consistent. :) Created attachment 252150 [details]
Patch
Comment on attachment 252150 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=252150&action=review > Source/WebCore/ChangeLog:3 > + [Freetype] Add support for the font-synthesis property Nit: extra space here > Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp:165 > + if (descriptionAllowsSyntheticBold && fontDescription.weight() >= FontWeightBold) { We're doing an extra check for < FontWeightBold here but I guess it's so simple that we can leave with it. (In reply to comment #5) > Comment on attachment 252150 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=252150&action=review > > > Source/WebCore/ChangeLog:3 > > + [Freetype] Add support for the font-synthesis property > > Nit: extra space here > > > Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp:165 > > + if (descriptionAllowsSyntheticBold && fontDescription.weight() >= FontWeightBold) { > > We're doing an extra check for < FontWeightBold here but I guess it's so > simple that we can leave with it. I think in this case we have to check whether the font needs the synthetic bold and also whether the font-synthesis property allows it. Committed r183673: <http://trac.webkit.org/changeset/183673> |