New issue
Advanced search Search tips

Issue 905840 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Jan 1
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Roboto Mono is not monospace for purposes of "ch" length

Project Member Reported by michae...@chromium.org, Nov 15

Issue description

Chrome Version: 70.0.3538.76
OS: Chrome

I don't know if this is a problem with the Roboto Mono font or with blink.

Repro: https://jsfiddle.net/sx8om379/

When the width of a block is set to "6ch", six 0 characters can be displayed (per spec), but only five "f" characters can be displayed before wrapping at whitespace.

Is this a problem in Blink or a problem with the font itself?

This issue explains why Gerrit sometimes wraps commit messages at 71 characters instead of 72.
 
Cc: drott@chromium.org e...@chromium.org
Status: Available (was: Untriaged)
I'm guessing that's a font issue, that glyphs have different widths (in spite of being named something with "mono"). But let's ask the font experts.

(I can reproduce the problem in your test on Linux, FWIW)
Labels: OS-Chrome OS-Linux OS-Windows
Windows too. It also repros in Edge, but does NOT repro in Firefox -- so there is *something* renderer specific happening.
On Linux, AvgCharWidth() from SimpleFontData: https://cs.chromium.org/chromium/src/third_party/blink/renderer/platform/fonts/simple_font_data.h?sq=package:chromium&dr=CSs&g=0&l=109
ultimately comes from FreeTypes' max bounding box for the FT_Face:

In that regard, this comment is interesting:
https://cs.chromium.org/chromium/src/third_party/freetype/src/include/freetype/freetype.h?sq=package:chromium&dr=CSs&g=0&l=974
which means that hinting can push things across the limit for the line break.

But I haven't verified whether that's the case here.




Roboto Mono is a notoriously buggy font. https://github.com/google/fonts/issues/142

Please don’t waste developer cycles working around the problem in Blink, when it’s known that this particular family has issues also in consoles/shells and other software.
Status: WontFix (was: Available)
This is indeed a problem with Roboto Mono. You might want to change gerrit to use a proper monospace font instead.

Sign in to add a comment