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

Issue 800392 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

The Noto Sans Mono font bundled with ChromeOS incorrectly uses optional Latin-script ligatures for "ffi", "ffl", "fi" & "fl" by default

Project Member Reported by bsittler@chromium.org, Jan 9 2018

Issue description

Chrome Version: Google Chrome	65.0.3315.0 (Official Build) canary (64-bit)
OS: ChromeOS Platform	10290.0.0 (Official Build) canary-channel samus

What steps will reproduce the problem?
(1) Ensure you are using ChromeOS (which includes the bundled "Noto Sans Mono" font)
(2) Navigate to
  data:text/html;charset=UTF-8,%3Cfont%20face%3D%22Noto%20Sans%20Mono%2CNoto%20Mono%22%3Eaffix%20firefly%20waffle%20%5BASCII%5D%3Cbr%3Eaff%26zwnj%3Bix%20f%26zwnj%3Biref%26zwnj%3Bly%20waff%26zwnj%3Ble%20%5BZWNJ%5D%3Cbr%3Eaff%26zwj%3Bix%20f%26zwj%3Biref%26zwj%3Bly%20waff%26zwj%3Ble%20%5BZWJ%5D%3Cbr%3Ea%26ffilig%3Bx%20%26filig%3Bre%26fllig%3By%20wa%26ffllig%3Be%20%5BPrecomposed%5D
   a.k.a.
  data:text/html;charset=UTF-8,<font%20face="Noto%20Sans%20Mono,Noto%20Mono">affix%20firefly%20waffle%20[ASCII]<br>aff&zwnj;ix%20f&zwnj;iref&zwnj;ly%20waff&zwnj;le%20[ZWNJ]<br>aff&zwj;ix%20f&zwj;iref&zwj;ly%20waff&zwj;le%20[ZWJ]<br>a&ffilig;x%20&filig;re&fllig;y%20wa&ffllig;e%20[Precomposed]
   a.k.a.
  data:text/html;charset=UTF-8,<html><head></head><body><font face="Noto Sans Mono,Noto Mono">affix firefly waffle [ASCII]<br>aff%E2%80%8Cix f%E2%80%8Ciref%E2%80%8Cly waff%E2%80%8Cle [ZWNJ]<br>aff%E2%80%8Dix f%E2%80%8Diref%E2%80%8Dly waff%E2%80%8Dle [ZWJ]<br>a%EF%AC%83x %EF%AC%81re%EF%AC%82y wa%EF%AC%84e [Precomposed]</font></body></html>

What is the expected result?
Ligated forms should only be used in the "Precomposed" row.
This matches behavior on other OSes when the related "Noto Mono" font is installed. https://www.google.com/get/noto/#mono-mono

Noto Sans Mono is a monospaced font (at least in the case of Unicode input in the range U+0020...U+007E) and its rendering should match typewriter character cell behavior for ASCII-compatible typography. Use of ligatures perturbs the cell count and breaks layout for plain text (e.g. <pre>) using this font.

What happens instead?
Ligated forms are also erroneously used in the ASCII case. They are also used in the ZWJ case, which could be considered correct or incorrect but in any case is uncommon enough that I don't really care.

Please use labels and text to provide additional information.


For graphics-related bugs, please copy/paste the contents of the about:gpu
page at the end of this report.

 
Screenshot 2018-01-09 at 10.18.07.png
29.8 KB View Download
For comparison I've attached a screenshot from a Linux desktop where the Noto Mono font is installed. I believe this is what ChromeOS with Noto Sans Mono should look like, too, with the possible exception of the "ZWJ" row.

Google Chrome	65.0.3311.3 (Official Build) dev (64-bit)
Revision	5ee9dc045602ca225269c3f27f12305955de9ffb-refs/branch-heads/3311@{#5}
OS	Linux
Screenshot 2018-01-09 at 10.20.19.png
76.2 KB View Download
Components: Blink>Fonts
On closer inspection, I suspect the downloadable "Noto Mono" is missing these ligatures, so it's possible the bundled "Noto Sans Mono" is just a broken font.
Cc: js...@chromium.org
Jungshik, it looks like you added this font in https://crrev.com/c/786080 - any idea whether this is a font bug or a Chrome/test rendering bug, or how to find out?
*text rendering, please excuse my typo

Comment 6 by e...@chromium.org, Jan 10 2018

Components: -Blink>Fonts OS
This appears to be a bug with the font, it shouldn't have ligatures that do not conform to the fixed-width grid. 

Over to ChromeOS team for further triage.
Description: Show this description
I think it's not a bug for a monospaced font to contain ligatures (each occupying at least one monospaced character cell) encoded at the appropriate Unicode codepoints for the precomposed compatibility ligatures:

- U+FB01 LATIN SMALL LIGATURE FI a.k.a. fi a.k.a. &filig;
- U+FB02 LATIN SMALL LIGATURE FL a.k.a. fl a.k.a. &fllig;
- U+FB03 LATIN SMALL LIGATURE FFI a.k.a. ffi a.k.a. &ffilig;
- U+FB04 LATIN SMALL LIGATURE FFL a.k.a. ffl a.k.a. &ffllig;

However it is a bug to substitute these for the logically equivalent character sequences "fi", "fl", "ffi" and "ffl". Are those substitutions encoded in the font?
Here's the test data in copy-and-paste-ready form:

affix firefly waffle [ASCII]
aff‌ix f‌iref‌ly waff‌le [ZWNJ]
aff‍ix f‍iref‍ly waff‍le [ZWJ]
affix firefly waffle [Precomposed]
Agreed w/ #c6 - it's a font bug. The related Noto Sans Mono CJK {JP,KR,SC,TC} fonts (also all bundled with ChromeOS) handle this correctly:


Screenshot 2018-01-11 at 16.25.48.png
24.0 KB View Download

Sign in to add a comment