CSS transform sometimes doesn't affect emoji size
Categories
(Core :: Graphics: Text, defect, P3)
Tracking
()
People
(Reporter: jason.orendorff, Assigned: gw)
References
(Regression)
Details
(Keywords: regression)
Attachments
(5 files, 1 obsolete file)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:153.0) Gecko/20100101 Firefox/153.0
Steps to reproduce:
- Open the attached HTML file
- Zoom in/out using trackpad gestures and/or resize the window horizontally
Actual results:
The emoji in the page are sometimes rendered in the wrong size. They're rendered at the correct location, but too small.
The page changes between rendering correctly and incorrectly as I zoom or resize.
Regular letters and digits in the same document render correctly.
This happens in Firefox 153.0.3 (aarch64) on Mac, Firefox 151 on Linux, and Firefox 153.0.3 (Build #2016176519) on Android 16.
Expected results:
The CSS contains transform: scale(1.6) and this should be consistently applied to all the emoji in the HTML.
| Reporter | ||
Updated•21 days ago
|
| Reporter | ||
Comment 1•21 days ago
|
||
If I add rotate(30deg) to the transform it's clear the transform isn't being applied to the emoji; when they are rendered small they are also unrotated.
| Reporter | ||
Comment 2•21 days ago
|
||
Comment 3•21 days ago
•
|
||
Also, when they're rendered correctly (i.e. at the enlarged size) after pinch-zooming, if I then start to select some of the text (which causes a repaint), they'll snap back to their untransformed size.
Seems like they "prefer" to render without the transform applied, but in some cases, particularly as a result of pinch-zoom, they do apply it correctly. Weird. I suspect this might have something to do with the emoji font involved using bitmap (rather than scalable outline) glyphs. If I force the use of a scalable-outline emoji font such as (modern COLRv1) Noto Color Emoji[1], I can't reproduce the issue.
[1] Note that many Linux distros appear to still have the older bitmap-format Noto Color Emoji, which is probably why comment 0 mentions reproducing this on Linux.
Comment 4•21 days ago
|
||
I think this is likely to be more on the Gfx/rendering side of things than Layout, given that they're in the right place and being measured correctly, afaict. Might be a webrender issue, or somewhere else up the painting stack.
| Reporter | ||
Comment 5•21 days ago
|
||
This different test case seems to trigger the bug 100% for me, on Mac, without user interaction.
The emoji should be the same size (3x) in both rows; instead the emoji in the second row are rendered small (1x).
Comment 7•20 days ago
|
||
mozregression indicates this is a result of bug 2044211.
Updated•20 days ago
|
Comment 8•20 days ago
|
||
Set release status flags based on info from the regressing bug 2044211
Updated•16 days ago
|
Updated•16 days ago
|
| Assignee | ||
Updated•15 days ago
|
| Assignee | ||
Comment 9•15 days ago
|
||
Bitmap fonts rasterize with an identity glyph shape, so a transform's scale
survives only as the scalar RasterizedGlyph::scale. The device glyph path from
bug 2044211 multiplies that into the atlas footprint, so a scaled emoji paints
at its untransformed size: too small scaling up, too big and clipped scaling
down (bug 2062234).
Widen the bug 2055177 bitmap-strike gate from "not an axis-aligned scale" to
"not a pure translation", so a scale joins rotation and skew on the local-raster
path.
2056856-bitmap-clip becomes scale(1.0)-only: wrench fakes a device pixel scale
with a root scale transform, so at other scales its glyphs are no longer
device-grid-placed and it asserts nothing.
Comment 10•14 days ago
|
||
Comment 11•13 days ago
|
||
| bugherder | ||
Comment 12•13 days ago
|
||
The patch landed in nightly and beta is affected, along with ESR.
:gw, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta and ESR approvals.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox155and the ESR status flag(s) towontfix.
For more information, please visit BugBot documentation.
Updated•11 days ago
|
Comment 13•11 days ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined/Reason for urgency: Visual artifacts
- Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: yes
- Steps to reproduce for manual QE testing: Per bug report
- Risk associated with taking this patch: low
- Explanation of risk level: Small patch
- String changes made/needed?: No
- Is Android affected?: yes
| Assignee | ||
Comment 14•11 days ago
|
||
Bitmap fonts rasterize with an identity glyph shape, so a transform's scale
survives only as the scalar RasterizedGlyph::scale. The device glyph path from
bug 2044211 multiplies that into the atlas footprint, so a scaled emoji paints
at its untransformed size: too small scaling up, too big and clipped scaling
down (bug 2062234).
Widen the bug 2055177 bitmap-strike gate from "not an axis-aligned scale" to
"not a pure translation", so a scale joins rotation and skew on the local-raster
path.
2056856-bitmap-clip becomes scale(1.0)-only: wrench fakes a device pixel scale
with a root scale transform, so at other scales its glyphs are no longer
device-grid-placed and it asserts nothing.
Original Revision: https://phabricator.services.mozilla.com/D318258
Updated•11 days ago
|
Updated•11 days ago
|
Updated•11 days ago
|
Comment 15•11 days ago
|
||
| uplift | ||
| Assignee | ||
Comment 16•11 days ago
|
||
Bitmap fonts rasterize with an identity glyph shape, so a transform's scale
survives only as the scalar RasterizedGlyph::scale. The device glyph path from
bug 2044211 multiplies that into the atlas footprint, so a scaled emoji paints
at its untransformed size: too small scaling up, too big and clipped scaling
down (bug 2062234).
Widen the bug 2055177 bitmap-strike gate from "not an axis-aligned scale" to
"not a pure translation", so a scale joins rotation and skew on the local-raster
path.
2056856-bitmap-clip becomes scale(1.0)-only: wrench fakes a device pixel scale
with a root scale transform, so at other scales its glyphs are no longer
device-grid-placed and it asserts nothing.
Original Revision: https://phabricator.services.mozilla.com/D318258
(cherry picked from commit 4e48f9ab6f40f42de1ad3d9b5dd3179b93f03c1b)
Updated•11 days ago
|
Comment 17•11 days ago
|
||
firefox-esr153 Uplift Approval Request
- User impact if declined/Reason for urgency: Both patches are needed to land cleanly on esr.
Bitmap glyphs under rotation or skew paint axis-aligned at their transformed pen, looking unrotated and displaced
Scaled emoji too small when scaling up, too large and hard-clipped when scaling down.
- Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: yes
- Steps to reproduce for manual QE testing: Per bug reports.
- Risk associated with taking this patch: low
- Explanation of risk level: Small patches
- String changes made/needed?: None
- Is Android affected?: yes
Updated•10 days ago
|
Updated•10 days ago
|
Updated•10 days ago
|
Comment 19•10 days ago
|
||
Reproduced the issue with Firefox 154 on macOS 14 aarch using the test case from comment 1 and comment 5. The emojis on the page are rendered in the wrong size.
I can confirm that with Firefox 156.0a1 (2026-08-17) and 155.0b1 from comment 15, the issue is no longer reproducible on macOS 14 and 27 aarch, Windows 11, and Ubuntu 24.
However, I can see that on Firefox with this test case, the second row of emojis is more blurred screenshot - Firefox is on the left side. Should I file a new issue for this? Thank you!
Comment 21•10 days ago
|
||
Regressing bug was reverted from ESR153.
Updated•9 days ago
|
Description
•