New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 742261 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Jan 2
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

Semibold system font on MacOS is drawn as Italic

Reported by leliuk...@yandex-team.ru, Jul 13 2017

Issue description

Chrome Version       : 61.0.3156.0
URLs (if applicable) :

What steps will reproduce the problem?
(1)Launch views_examples_with_content_exe
(2)Choose TextField
(3)Choose Semibold font

What is the expected result?
Text is not Italic

What happens instead?
Text is Italic

Please provide any additional information below. Attach a screenshot if
possible.

 
semibold_mac_error.mp4
6.5 MB View Download
Cc: ligim...@chromium.org
Components: Blink>Fonts
Labels: Needs-Triage-M61 Needs-Bisect
Cc: jmukthavaram@chromium.org
Labels: Needs-Feedback
leliukmar@,
Thanks for filing the issue.
Could you please provide us above views_examples_with_content_exe file to triage the issue from TE end.


Project Member

Comment 3 by bugdroid1@chromium.org, Jul 18 2017

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

commit 515f516d578e69f58460cd245b9361d57634f603
Author: Mariia Leliuk <leliukmar@yandex-team.ru>
Date: Tue Jul 18 08:09:01 2017

Fix for Appkit sometimes making the font italic when changing font's weight

When trying to get Semibold font using cocoa's convertWeight it somehow becomes
Italic.
It looks like there is a problem in cocoa. I have tried the following test
(which follows the steps to get Semibold font in platform_font_mac.mm) and it
fails on the last line:

  NSFont* ns_font = [NSFont systemFontOfSize:13];
  NSFontManager* font_manager = [NSFontManager sharedFontManager];

  ns_font = [font_manager convertFont:ns_font toHaveTrait:NSBoldFontMask];
  {
    NSFontTraitMask traits = [font_manager traitsOfFont:ns_font];
    EXPECT_FALSE(traits & NSItalicFontMask);
  }

  ns_font = [font_manager convertWeight:NO ofFont:ns_font];
  {
    NSFontTraitMask traits = [font_manager traitsOfFont:ns_font];
    EXPECT_FALSE(traits & NSItalicFontMask);
  }

So we should better apply NSFontTraitMask to the derived font unconditionally.

BUG= 742261 

Change-Id: If7d6c93cd95a3afce0909d65a8668f7a111eb429
Reviewed-on: https://chromium-review.googlesource.com/570041
Reviewed-by: Trent Apted <tapted@chromium.org>
Reviewed-by: Alexei Svitkine (slow) <asvitkine@chromium.org>
Commit-Queue: Trent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487416}
[modify] https://crrev.com/515f516d578e69f58460cd245b9361d57634f603/ui/gfx/platform_font_mac.mm
[modify] https://crrev.com/515f516d578e69f58460cd245b9361d57634f603/ui/gfx/platform_font_mac_unittest.mm

Labels: -Needs-Bisect -Needs-Triage-M61
leliukmar@, thank you for the fix. On other hand, can you please provide the repro case? we want to make sure the fix is working across all channels without any issues.
Labels: M-61 OS-Mac
I have found this bug when I was trying to use Semibold font on macOS 10.10(on macOS 10.12 bug did not occur due to different system font).
Currently Semibold font weight is not used in Chromium, so to reproduce the problem you should run views_examples_with_content_exe, go to the Text Styles section and choose Semibold in Font Weight section.
Project Member

Comment 7 by sheriffbot@chromium.org, Jul 19 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "jmukthavaram@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: krajshree@chromium.org
Labels: Needs-Feedback
leliukmar@ - Thanks for the fix...!!

Could you please provide views_examples_with_content_exe file to verify the issue from TE-end.

Thanks...!!
In the attached file you can find the views_examples_with_content_exe file where you can reproduce the bug. But you can also build it yourself from the source code (target name is "views_examples_with_content_exe"). Please let me know if you need anything else.

I also seems to me that the component of this bug is not right, because this bug concerns UI part, not Blink...
views_examples_with_content_exe.zip
7.0 KB Download
Project Member

Comment 10 by sheriffbot@chromium.org, Jul 19 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "krajshree@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 11 by e...@chromium.org, Jul 27 2017

Owner: krajshree@chromium.org
Status: Assigned (was: Unconfirmed)
Status: WontFix (was: Assigned)

Sign in to add a comment