Closed Bug 1916781 Opened 1 year ago Closed 1 year ago

Canvas font size in `px` should not be affected by text zoom

Categories

(Core :: CSS Parsing and Computation, defect, P3)

Firefox 130
defect

Tracking

()

RESOLVED DUPLICATE of bug 1909625

People

(Reporter: timdream, Unassigned)

References

Details

Attachments

(1 file)

Attached file canvas-text-size.html

Canvas font size in px should not be affected by text zoom

STR:

  1. Load the test case
  2. Turn on text zoom and zoom in the text

Expected:

  1. All text in layout gets bigger including the one with font size set to 16px.
  2. Text size on canvas remain unchanged.

Actual:

  1. All font sizes, including the one on canvas, is inflated.

Note:

  1. One may be tempted to argue that the current behavior provides consistency between layout and canvas, but custom layout on canvas is much more limited; As demonstrated here, canvas layout cannot expand the bounding boxes and flow automatically like web layout. Developer will not be able to accommodate canvas font size changes in all cases.
  2. Chrome does not change font sizes specified in px, in web layout nor canvas. macOS Safari does change font sizes specified in px but in web layout only, not on canvas. Firefox is the outlier here which web developers will likely ignore/unaware. This creates web compact issue.

Entry point is probably this one

Severity: -- → S3
Priority: -- → P3
See Also: → 1909625

I'll fix this along with bug 1909625.

Status: NEW → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1909625
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: