Open Bug 1580953 Opened 7 years ago Updated 2 years ago

Canvas doesn't support font-variant-numeric

Categories

(Core :: Graphics: Canvas2D, enhancement)

69 Branch
enhancement

Tracking

()

UNCONFIRMED

People

(Reporter: dsmmcken, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36

Steps to reproduce:

Using a font face that has tabular numbers, set font-variant-numeric: tabular-nums; in css on the canvas element.

Actual results:

Numbers shown are normal, not tabular.

Expected results:

Both Chrome and Safari display tabular numbers, Firefox does not.

Chrome/Safari appear to use the font-variant and font-feature-settings values from the font style source object for the initial font settings, which seems reasonable, as there is no standards way to pass these values to canvas otherwise.

https://codepen.io/dsmmcken/pen/GRKQGeK

Component: Untriaged → Canvas: 2D
Product: Firefox → Core
Severity: normal → S3

Update: confirmed bug still exists in Firefox version 129.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: