New issue
Advanced search Search tips

Issue 721834 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug

Blocking:
issue 630357



Sign in to add a comment

Letter spacing / Kerning discrepancy in Title text

Project Member Reported by bettes@chromium.org, May 12 2017

Issue description

Actual:
Bookmarks Title uses a 0 kerning
Payments Title uses a -0.6 kerning (smaller)

Expected: 
All title text should use the same kerning. Preferably it's the default setting that OSX provides with the given text-size. Avoid customized kerning. 
 
Artboard.png
40.1 KB View Download
Owner: tapted@chromium.org
Trent has the most familiarity with OS X font stuff in Harmony dialogs.

Comment 2 by tapted@chromium.org, May 15 2017

Cc: ma...@chromium.org anthonyvd@chromium.org
Status: Assigned (was: Untriaged)
Yah, the system font on Mac comes with some custom kerning I think. There's some logic in PlatformFontMac that tries to preserve it.

The payments dialog is using

  views::Label* title_label = new views::Label(title);
  title_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
  title_label->SetFontList(
      title_label->GetDefaultFontList().DeriveWithSizeDelta(
          ui::kTitleFontSizeDelta));
  layout->AddView(title_label);

No dialog code should be invoking FontList::Derive* (it's slow) -- they should all use ResourceBundle (in the past) or, now, views::style::GetFont(CONTEXT_DIALOG_TITLE). I think this will fix it.. although I also don't immediately see a reason why they should differ :/

(Of course... ideally, the payments stuff also uses the title provided by DialogClientView)

Comment 3 by tapted@chromium.org, May 22 2017

Components: UI>Browser>Autofill>Payments
Status: Started (was: Assigned)
https://codereview.chromium.org/2899653002
mac_add_card_before.png
82.3 KB View Download
mac_add_card_after.png
65.2 KB View Download
mac_before.png
77.0 KB View Download
mac_after.png
64.7 KB View Download
windows_canary.png
53.7 KB View Download
text_comparison.png
21.2 KB View Download
Project Member

Comment 4 by bugdroid1@chromium.org, May 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/424d27cceaba0271bc21e9c9b48a39e4d5a2b21f

commit 424d27cceaba0271bc21e9c9b48a39e4d5a2b21f
Author: tapted <tapted@chromium.org>
Date: Tue May 23 00:39:02 2017

Remove uses of FontList::Derive*(..) in views payments dialogs.

FontList::Derive(..) is slow (typically requiring IPC with the font
server), has unpredictable results with special UI fonts on Mac, and
encourages use of magic numbers like "-1".

Instead, use context and style constants from the Chrome typography
spec, where available. When an equivalent font is not available, use
ResourceBundle to avoid a behavior change in this CL.

BUG= 721834 

Review-Url: https://codereview.chromium.org/2899653002
Cr-Commit-Position: refs/heads/master@{#473764}

[modify] https://crrev.com/424d27cceaba0271bc21e9c9b48a39e4d5a2b21f/chrome/browser/ui/test/test_browser_dialog.cc
[modify] https://crrev.com/424d27cceaba0271bc21e9c9b48a39e4d5a2b21f/chrome/browser/ui/test/test_browser_dialog.h
[modify] https://crrev.com/424d27cceaba0271bc21e9c9b48a39e4d5a2b21f/chrome/browser/ui/views/payments/editor_view_controller.cc
[modify] https://crrev.com/424d27cceaba0271bc21e9c9b48a39e4d5a2b21f/chrome/browser/ui/views/payments/order_summary_view_controller.cc
[modify] https://crrev.com/424d27cceaba0271bc21e9c9b48a39e4d5a2b21f/chrome/browser/ui/views/payments/payment_method_view_controller.cc
[modify] https://crrev.com/424d27cceaba0271bc21e9c9b48a39e4d5a2b21f/chrome/browser/ui/views/payments/payment_request_browsertest.cc
[modify] https://crrev.com/424d27cceaba0271bc21e9c9b48a39e4d5a2b21f/chrome/browser/ui/views/payments/payment_request_views_util.cc
[modify] https://crrev.com/424d27cceaba0271bc21e9c9b48a39e4d5a2b21f/chrome/browser/ui/views/payments/payment_request_views_util.h
[modify] https://crrev.com/424d27cceaba0271bc21e9c9b48a39e4d5a2b21f/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc

Project Member

Comment 5 by bugdroid1@chromium.org, May 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ddc5e16ef9191ecf5f74c039ed8cebaf9390765b

commit ddc5e16ef9191ecf5f74c039ed8cebaf9390765b
Author: cfroussios <cfroussios@chromium.org>
Date: Tue May 23 08:36:56 2017

Revert of Remove uses of FontList::Derive*(..) in views payments dialogs. (patchset #4 id:60001 of https://codereview.chromium.org/2899653002/ )

Reason for revert:
Breaks compilation
see  crbug.com/725407 

Original issue's description:
> Remove uses of FontList::Derive*(..) in views payments dialogs.
>
> FontList::Derive(..) is slow (typically requiring IPC with the font
> server), has unpredictable results with special UI fonts on Mac, and
> encourages use of magic numbers like "-1".
>
> Instead, use context and style constants from the Chrome typography
> spec, where available. When an equivalent font is not available, use
> ResourceBundle to avoid a behavior change in this CL.
>
> BUG= 721834 
>
> Review-Url: https://codereview.chromium.org/2899653002
> Cr-Commit-Position: refs/heads/master@{#473764}
> Committed: https://chromium.googlesource.com/chromium/src/+/424d27cceaba0271bc21e9c9b48a39e4d5a2b21f

TBR=anthonyvd@chromium.org,pkasting@chromium.org,tapted@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 721834 

Review-Url: https://codereview.chromium.org/2901763002
Cr-Commit-Position: refs/heads/master@{#473839}

[modify] https://crrev.com/ddc5e16ef9191ecf5f74c039ed8cebaf9390765b/chrome/browser/ui/test/test_browser_dialog.cc
[modify] https://crrev.com/ddc5e16ef9191ecf5f74c039ed8cebaf9390765b/chrome/browser/ui/test/test_browser_dialog.h
[modify] https://crrev.com/ddc5e16ef9191ecf5f74c039ed8cebaf9390765b/chrome/browser/ui/views/payments/editor_view_controller.cc
[modify] https://crrev.com/ddc5e16ef9191ecf5f74c039ed8cebaf9390765b/chrome/browser/ui/views/payments/order_summary_view_controller.cc
[modify] https://crrev.com/ddc5e16ef9191ecf5f74c039ed8cebaf9390765b/chrome/browser/ui/views/payments/payment_method_view_controller.cc
[modify] https://crrev.com/ddc5e16ef9191ecf5f74c039ed8cebaf9390765b/chrome/browser/ui/views/payments/payment_request_browsertest.cc
[modify] https://crrev.com/ddc5e16ef9191ecf5f74c039ed8cebaf9390765b/chrome/browser/ui/views/payments/payment_request_views_util.cc
[modify] https://crrev.com/ddc5e16ef9191ecf5f74c039ed8cebaf9390765b/chrome/browser/ui/views/payments/payment_request_views_util.h
[modify] https://crrev.com/ddc5e16ef9191ecf5f74c039ed8cebaf9390765b/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc

Project Member

Comment 6 by bugdroid1@chromium.org, May 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/17d6248cb822cf06ae06fccd65fbeebfa7b4af2a

commit 17d6248cb822cf06ae06fccd65fbeebfa7b4af2a
Author: tapted <tapted@chromium.org>
Date: Tue May 23 11:35:49 2017

Remove uses of FontList::Derive*(..) in views payments dialogs.

FontList::Derive(..) is slow (typically requiring IPC with the font
server), has unpredictable results with special UI fonts on Mac, and
encourages use of magic numbers like "-1".

Instead, use context and style constants from the Chrome typography
spec, where available. When an equivalent font is not available, use
ResourceBundle to avoid a behavior change in this CL.

BUG= 721834 

Review-Url: https://codereview.chromium.org/2899653002
Cr-Original-Commit-Position: refs/heads/master@{#473764}
Committed: https://chromium.googlesource.com/chromium/src/+/424d27cceaba0271bc21e9c9b48a39e4d5a2b21f
Review-Url: https://codereview.chromium.org/2899653002
Cr-Commit-Position: refs/heads/master@{#473859}

[modify] https://crrev.com/17d6248cb822cf06ae06fccd65fbeebfa7b4af2a/chrome/browser/ui/test/test_browser_dialog.cc
[modify] https://crrev.com/17d6248cb822cf06ae06fccd65fbeebfa7b4af2a/chrome/browser/ui/test/test_browser_dialog.h
[modify] https://crrev.com/17d6248cb822cf06ae06fccd65fbeebfa7b4af2a/chrome/browser/ui/views/payments/editor_view_controller.cc
[modify] https://crrev.com/17d6248cb822cf06ae06fccd65fbeebfa7b4af2a/chrome/browser/ui/views/payments/order_summary_view_controller.cc
[modify] https://crrev.com/17d6248cb822cf06ae06fccd65fbeebfa7b4af2a/chrome/browser/ui/views/payments/payment_method_view_controller.cc
[modify] https://crrev.com/17d6248cb822cf06ae06fccd65fbeebfa7b4af2a/chrome/browser/ui/views/payments/payment_request_browsertest.cc
[modify] https://crrev.com/17d6248cb822cf06ae06fccd65fbeebfa7b4af2a/chrome/browser/ui/views/payments/payment_request_views_util.cc
[modify] https://crrev.com/17d6248cb822cf06ae06fccd65fbeebfa7b4af2a/chrome/browser/ui/views/payments/payment_request_views_util.h
[modify] https://crrev.com/17d6248cb822cf06ae06fccd65fbeebfa7b4af2a/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc

Comment 7 by tapted@chromium.org, May 26 2017

Status: Fixed (was: Started)
Fixed.

But the dialogs use bold/medium fonts in a variety of places. 10.9 and 10.11 only have a fully-bold system UI font installed by default.

Also there is no bold or medium font in the harmony typography spec except for buttons - we should add one (and define what it should be on <10.12) if we want to keep this style for payments dialogs.
Components: -UI>Browser>Autofill>Payments UI>Browser>Payments

Sign in to add a comment