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

Issue 632142 link

Starred by 13 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug-Regression

Blocked on:
issue skia:5685



Sign in to add a comment

Courier font doesn't work (falls back to Times New Roman)

Project Member Reported by jdpaul@google.com, Jul 27 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36

Steps to reproduce the problem:
1. Go to chrome://settings/
2. Click Show Advanced Settings
3. Under Web Content, click Customize Fonts
4. Under Fixed-Width Font, choose Courier.  Times New Roman will be displayed.

What is the expected behavior?
Courier will be used.

What went wrong?
Times New Roman is used for fixed-width fonts.  

Did this work before? Yes Until this morning when I updated Chrome.  (I do not have previous version #, sorry.)

Chrome version: 52.0.2743.82  Channel: stable
OS Version: Ubuntu 14.04
Flash Version: Shockwave Flash 22.0 r0

Workaround: Courier New works.  

Why is Courier listed if it's not actually available?
 
Chrome-Courier.png
71.5 KB View Download
Project Member

Comment 1 by sheriffbot@chromium.org, Jul 28 2016

Labels: Hotlist-Google

Comment 2 by ajha@chromium.org, Aug 5 2016

Cc: gov...@chromium.org ligim...@chromium.org e...@chromium.org ajha@chromium.org
Components: -UI Blink>Fonts
Labels: -Type-Bug -Pri-2 ReleaseBlock-Stable M-52 Pri-1 Type-Bug-Regression
Owner: drott@chromium.org
Status: Assigned (was: Unconfirmed)
Able to reproduce the issue on the latest M-54(54.0.2820.0), latest beta(53.0.2785.46) and the latest stable(52.0.2743.116) on Linux Ubuntu 14.04. Works fine on Windows-7 and Mac OS 10.11.5

This is a regression issue broken in M-52.

Last good build: 52.0.2723.0
First bad build: 52.0.2724.0

Changelog:https://chromium.googlesource.com/chromium/src/+log/efaf1b116773bbbc1b5e77358171f8c8d6b6b771..23fff35c8f6011affb8c3025b5e4ec3e82c13bb0

Suspecting: https://chromium.googlesource.com/chromium/src/+/4d16ac208962784ddd8744e7a5d4e43b7e24e8ff

drott@: Could you please take a look.

Marking this as Stable blocker for M-52 in case there is any stable refresh.

Other reports for similar issue:  Issue 632928  , Issue 633566

Comment 3 by ajha@chromium.org, Aug 5 2016

 Issue 632928  has been merged into this issue.

Comment 4 by ajha@chromium.org, Aug 5 2016

Cc: tkonch...@chromium.org
Issue 633566 has been merged into this issue.

Comment 5 by drott@chromium.org, Aug 5 2016

Cc: behdad@chromium.org
Behdad, this seems to be a duplicate of  issue 630508 , is "Courier" a Type 1 font? "Courier New" works, as mentioned in the report description. 

Comment 6 Deleted

Comment 7 by drott@chromium.org, Aug 5 2016

Labels: -ReleaseBlock-Stable
Status: Assigned (was: Duplo)
Yes, this is a duplicate of the Type 1 font support removal regression/choice,  issue 630508 . I won't merge the issues yet.

fc-list "Courier"
[...]
/usr/share/fonts/type1/texlive-fonts-recommended/pcrr8a.pfb: Courier:style=Regular

$ fc-list "Courier 10 pitch"
/usr/share/fonts/X11/Type1/c0419bt_.pfb: Courier 10 Pitch:style=Regular
[...]

The default user profile value for a monospace font: "Monospace", which uses DejaVu Sans Mono still works. 

Font matching for "font-family: Courier" only works if no Type1 Courier variants are installed, in other words, on Ubuntu: if the texlive-fonts-recommended package is not installed.

This is an important issue, but I don't think this justifies a ReleaseBlock-Stable at the moment, removing the label.


Comment 8 by drott@chromium.org, Aug 5 2016

Cc: bunge...@chromium.org
https://codereview.chromium.org/2222523002 is one place and example, where we would need to filter. Similar for finding fallback fonts and for the selection of fonts shown in the settings.

Behdad, what would be the correct font format pattern specification, only "TrueType" or  "CFF" as well? As far as I understood the fontconfig documentation, the values for these are coming from FreeType's https://www.freetype.org/freetype2/docs/reference/ft2-font_formats.html 

Ben, can we make this permanent in Skia, or would this need to be a parameter to matchFamily in FontConfigInterface?

Comment 9 by drott@chromium.org, Aug 5 2016

This regression was caused by an important OpenType performance optimization. I tend to agree with Behdad in that I don't want to jump through extra hoops to keep supporting Type 1 fonts in Chrome and rather focus on improving OpenType support. Does that sound okay with you, eae@?
Another way to test:

data:text/html;charset=utf-8,%3Cdiv%20style%3D%22font-family%3A%20monospace%22%3Etest%3C%2Fdiv%3E%0D%0A%3Cdiv%20style%3D%22font-family%3A%20courier%22%3Etest%3C%2Fdiv%3E

Both lines should display in a monospaced font, whereas when there is a "Courier" Type 1 font and it is configured as the default monospaced font, this fails.

Filter for TrueType and CFF.  Ie. add both.
 Issue 635150  has been merged into this issue.
drott@, Can the issue be unrestricted for others to view since the reporter ( lutzky@google.com) of issue 633566 is unavailable to view this.
Labels: allpublic
Yes, clear for unrestricting from my point of view. 
Blockedon: skia:5685
Project Member

Comment 16 by bugdroid1@chromium.org, Sep 8 2016

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

commit bdbc597424976a0b2f23b38b0c3630b636347ad2
Author: drott <drott@chromium.org>
Date: Thu Sep 08 10:55:16 2016

Configure font font names in GFX unittests

Currently the GFX unittests assume a font called "Symbol" to be
available on all platforms. While the "Symbol" font may be available on
Ubuntu, it is a deprecated Type 1 package and stems from the
xfonts-mathml package on Debian, which is deprecated and no longer
maintained in favor of the newer STIX fonts [1].

In preparation for activating filtering for SNFT format font files, we
have to break with the assumption above and make at least some of the
used fonts in the gfx unittests configurable per OS.

This CL makes the symbol font name configurable and replace it with
"DejaVu Sans" on Linux.

In addition to reconfiguring the Symbol font this CL introduces a CJK
font as an example of a font that has a different descender/ascender
ratio to Arial as some unittests such as
StringSizeRespectsFontListMetrics require, since the newly chosen symbol
font on Linux does not that expose that property.

To make StringSizeRespectsFontListMetrics more robust, this CL adds
additional assertions based on GetFontSpansForTesting.

[1] https://tracker.debian.org/pkg/xfonts-mathml

BUG= 632142 

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

[modify] https://crrev.com/bdbc597424976a0b2f23b38b0c3630b636347ad2/ui/gfx/BUILD.gn
[modify] https://crrev.com/bdbc597424976a0b2f23b38b0c3630b636347ad2/ui/gfx/font_list_unittest.cc
[add] https://crrev.com/bdbc597424976a0b2f23b38b0c3630b636347ad2/ui/gfx/font_names_testing.cc
[add] https://crrev.com/bdbc597424976a0b2f23b38b0c3630b636347ad2/ui/gfx/font_names_testing.h
[modify] https://crrev.com/bdbc597424976a0b2f23b38b0c3630b636347ad2/ui/gfx/font_unittest.cc
[modify] https://crrev.com/bdbc597424976a0b2f23b38b0c3630b636347ad2/ui/gfx/render_text_unittest.cc

Project Member

Comment 17 by bugdroid1@chromium.org, Sep 8 2016

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

commit 7834a17f1cc0d8e187531eeade45ebcb391b1308
Author: drott <drott@chromium.org>
Date: Thu Sep 08 14:15:12 2016

Activate Skia SFNT filter, avoid Type 1 fonts

https://codereview.chromium.org/2280053002 adds the possibility to
filter for only SFNT fonts in Skia on Linux, avoiding Type 1 font
files, conditional on the define
SK_FONT_CONFIG_INTERFACE_ONLY_ALLOW_SFNT_FONTS.

This CL activates the filter in Chrome by defining this value.

BUG= 632142 

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

[modify] https://crrev.com/7834a17f1cc0d8e187531eeade45ebcb391b1308/skia/config/SkUserConfig.h

Status: Fixed (was: Assigned)
> Why is Courier listed if it's not actually available?

Fixed now, Type 1 fonts are not selectable from the settings anymore.

Also, type 1 fonts are no longer used or fallen back to in font selection.
Cc: drott@chromium.org derat@chromium.org
 Issue 630508  has been merged into this issue.
Project Member

Comment 20 by bugdroid1@chromium.org, Sep 8 2016

Labels: merge-merged-2854
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bdbc597424976a0b2f23b38b0c3630b636347ad2

commit bdbc597424976a0b2f23b38b0c3630b636347ad2
Author: drott <drott@chromium.org>
Date: Thu Sep 08 10:55:16 2016

Configure font font names in GFX unittests

Currently the GFX unittests assume a font called "Symbol" to be
available on all platforms. While the "Symbol" font may be available on
Ubuntu, it is a deprecated Type 1 package and stems from the
xfonts-mathml package on Debian, which is deprecated and no longer
maintained in favor of the newer STIX fonts [1].

In preparation for activating filtering for SNFT format font files, we
have to break with the assumption above and make at least some of the
used fonts in the gfx unittests configurable per OS.

This CL makes the symbol font name configurable and replace it with
"DejaVu Sans" on Linux.

In addition to reconfiguring the Symbol font this CL introduces a CJK
font as an example of a font that has a different descender/ascender
ratio to Arial as some unittests such as
StringSizeRespectsFontListMetrics require, since the newly chosen symbol
font on Linux does not that expose that property.

To make StringSizeRespectsFontListMetrics more robust, this CL adds
additional assertions based on GetFontSpansForTesting.

[1] https://tracker.debian.org/pkg/xfonts-mathml

BUG= 632142 

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

[modify] https://crrev.com/bdbc597424976a0b2f23b38b0c3630b636347ad2/ui/gfx/BUILD.gn
[modify] https://crrev.com/bdbc597424976a0b2f23b38b0c3630b636347ad2/ui/gfx/font_list_unittest.cc
[add] https://crrev.com/bdbc597424976a0b2f23b38b0c3630b636347ad2/ui/gfx/font_names_testing.cc
[add] https://crrev.com/bdbc597424976a0b2f23b38b0c3630b636347ad2/ui/gfx/font_names_testing.h
[modify] https://crrev.com/bdbc597424976a0b2f23b38b0c3630b636347ad2/ui/gfx/font_unittest.cc
[modify] https://crrev.com/bdbc597424976a0b2f23b38b0c3630b636347ad2/ui/gfx/render_text_unittest.cc

Project Member

Comment 21 by bugdroid1@chromium.org, Sep 8 2016

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

commit 7834a17f1cc0d8e187531eeade45ebcb391b1308
Author: drott <drott@chromium.org>
Date: Thu Sep 08 14:15:12 2016

Activate Skia SFNT filter, avoid Type 1 fonts

https://codereview.chromium.org/2280053002 adds the possibility to
filter for only SFNT fonts in Skia on Linux, avoiding Type 1 font
files, conditional on the define
SK_FONT_CONFIG_INTERFACE_ONLY_ALLOW_SFNT_FONTS.

This CL activates the filter in Chrome by defining this value.

BUG= 632142 

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

[modify] https://crrev.com/7834a17f1cc0d8e187531eeade45ebcb391b1308/skia/config/SkUserConfig.h

Sign in to add a comment