Open Bug 1727020 Opened 3 years ago Updated 9 months ago

[Bug]: Canvas rendered text gets affected by text sizing features

Categories

(Core :: Graphics: Canvas2D, defect)

Unspecified
Android
defect

Tracking

()

People

(Reporter: kbrosnan, Unassigned)

References

Details

Attachments

(1 obsolete file)

From github: https://github.com/mozilla-mobile/fenix/issues/20959.

Steps to reproduce

  1. Change the text scaling level beyond or below a 100% OR have "Automatic font sizing" enabled in Accesibility options
  2. Have a page with <meta name="viewport" content="width=device-width, initial-scale=1.0">
  3. Have a canvas element
  4. Render text on the canvas

Sample codepen: https://codepen.io/Eskuero/pen/WNOeOJR

This is how it looks with the different percentage of scaling

Expected behaviour

The text in the canvas should stay the same size regarless of viewport properties and browser filters.

Actual behaviour

The text gets scaled unlike in Firefox Desktop and Chrome (both versions) and ends messing up the draw because you can't have an expectancy of how it's size will rendered in relation with other drawings you might do on the canvas.

Device name

Samsung Galaxy Tab A 10.1, Xiaomi Mi A2 Lite

Android version

10

Firefox release type

Firefox

Firefox version

92.0.20210715094037

Device logs

No response

Additional information

No response

Change performed by the Move to Bugzilla add-on.

Interesting – my intent when implementing this was that it should work like text zooming on Desktop, which indeed does not affect the rendering of canvas text.

Component: General → Canvas: 2D
Product: GeckoView → Core
Severity: -- → S3
See Also: → 1724732
Attachment #9386996 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: