Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Issue 2189353002: Mac: Fix PlatformFontMac::DeriveFont for underline font style. (Closed)

Created:
4 years, 4 months ago by karandeepb
Modified:
4 years, 4 months ago
Reviewers:
Avi (use Gerrit)
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mac: Fix PlatformFontMac::DeriveFont for underline font style. PlatformFontMac::DeriveFont derives the font from the existing font descriptor if only the font size has to be altered. But in this case, if the existing font has the underline style set, it is lost in the derived PlatformFontMac instance. This is because NSFont does not support underline as a font trait and while creating the derived PlatformFontMac instance, we fail to set the underline property in the derived PlatformFontMac instance. This CL fixes the issue by passing the underline style to the PlatformFontMac constructor. A test is also added which fails for the current master on Mac. BUG=605404 TEST=On Mac, build and run views_examples_with_content_exe. Select the "Text Styles" example. Check "Underline". Verify the text gets underlined. It becoming bold is another issue that will be fixed in a follow-up.

Patch Set 1 #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -16 lines) Patch
M ui/gfx/font_unittest.cc View 1 chunk +13 lines, -0 lines 4 comments Download
M ui/gfx/platform_font_mac.h View 1 chunk +1 line, -1 line 1 comment Download
M ui/gfx/platform_font_mac.mm View 4 chunks +13 lines, -15 lines 2 comments Download

Dependent Patchsets:

Messages

Total messages: 16 (12 generated)
karandeepb
PTAL asvitkine@. Thanks. https://codereview.chromium.org/2189353002/diff/1/ui/gfx/font_unittest.cc File ui/gfx/font_unittest.cc (right): https://codereview.chromium.org/2189353002/diff/1/ui/gfx/font_unittest.cc#newcode161 ui/gfx/font_unittest.cc:161: TEST_F(FontTest, DeriveFont) { All the other ...
4 years, 4 months ago (2016-08-05 11:03:07 UTC) #13
karandeepb
Sorry. Pressed enter too quickly. PTAL avi@ :).
4 years, 4 months ago (2016-08-05 11:04:05 UTC) #14
Avi (use Gerrit)
lgtm https://codereview.chromium.org/2189353002/diff/1/ui/gfx/font_unittest.cc File ui/gfx/font_unittest.cc (right): https://codereview.chromium.org/2189353002/diff/1/ui/gfx/font_unittest.cc#newcode161 ui/gfx/font_unittest.cc:161: TEST_F(FontTest, DeriveFont) { On 2016/08/05 11:03:07, karandeepb wrote: ...
4 years, 4 months ago (2016-08-05 14:54:59 UTC) #15
karandeepb
4 years, 4 months ago (2016-08-09 01:04:40 UTC) #16
Message was sent while issue was closed.
Closed in light of crrev.com/2222483002.

Powered by Google App Engine
This is Rietveld 408576698