Bug 215121 - monospace font inconsistently selected
Summary: monospace font inconsistently selected
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified macOS 10.14
: P2 Normal
Assignee: Myles C. Maxfield
Keywords: InRadar
Depends on:
Reported: 2020-08-04 02:25 PDT by Sam Sneddon [:gsnedders]
Modified: 2022-01-06 06:22 PST (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Sam Sneddon [:gsnedders] 2020-08-04 02:25:17 PDT
Since wpt.fyi first started trying to run Catalina(!) and STP 111, there’s a whole bunch of regressions that appear to be down inconsistent font selection (no in-depth analysis done on most, merely noted they visually appear to be the same issue).

An example is:


test: http://wpt.live/css/CSS2/bidi-text/bidi-011.xht
ref: http://wpt.live/css/CSS2/bidi-text/bidi-011-ref.xht

Both of these have `font: 2em monospace`. I _think_ the test is matching Menlo and the ref is matching Courier, but that is from a brief visual inspection.

From a brief glance, it appears some of the failures in bug 214290 are related.

<rdar://66400419> (which hopefully works to link this)
Comment 1 Radar WebKit Bug Importer 2020-08-04 02:33:17 PDT
Comment 2 Alexey Proskuryakov 2020-08-04 13:34:33 PDT
Comment 3 Sam Sneddon [:gsnedders] 2022-01-06 06:22:36 PST
From discussion with Myles:

There was a desire to use the system's monospace font in at least some cases, as Menlo / Monaco have better typography than Courier, while still not being inconsistent with other browsers.

The decision previously was to try and thread the web compat needle by using Courier in the case when no lang was explicitly provided, and use the system default otherwise.

On the whole, my suggestion is to try and see if we can get away with using the lang=en system default for no-lang, rather than using Courier when no lang is provided, as this difference between lang=en and no-lang just introduces another web compat risk (as WPT has found).