为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

PX to pixel display ratio

  • 2 个回答
  • 0 人有此问题
  • 1 次查看
  • 最后回复者为 sandy50

more options

I use HTML files to create images for a tile based game we play. 6 months ago I was able to create a table with collapsed borders and 0px padding, margins, and borders, then draw my image with 207 x 207 JPEG TDs in multiple TR rows, then place another GIF image over all the JPEGs with transparent edges. Doing this for a table that was 6 tiles (207px) wide and 4 tiles deep, at ctrl 0, displayed a Firefox combined image that was exactly 1242px x 828px that was completely visible on 24 inch 1920 x 1080 DELL monitor. This allowed me to right click an empty space on my Firefox screen and select Take Screenshot to click on the GIF overlay image and capture that image with all of the tiles that were behind its transparent edges.

For some reason, I have no idea why, my 207px by 207px tile images are now being displayed as 282px by 282px at ctrl 0, and the overall image is now too large to fit on the screen, so taking a screenshot of the proper sized image is no longer possible. For example, at ctrl- ctrl-, the tile images are 221 pixels square, which should be 1326 pixels wide for 6 tiles, but my 1242px wide GIF file displays at 1330 pixels wide, probably due to some kind of rounding error.

I was able to use about:config and change layout.css.devPixelsPerPx from -1.0 to 0.74 and it did solve the problem. But it does so with a lot of warning for changing that default value!

So my question is simple: how does Firefox, on Windows 10, determine its screen pixel to Image px relationship? I need to know what to look at for the proper way to get my px to pixel ratio back to 1 to 1.

This is what the working image looks like while designing the center scoreboard tile https://user-media-prod-cdn.itsre-sumo.mozilla.net/uploads/images/2022-08-23-13-36-34-2fa67f.png

and this is what the final image looks like when you take a screenshot of the image https://user-media-prod-cdn.itsre-sumo.mozilla.net/uploads/images/2022-08-23-13-36-53-beae42.png

I use HTML files to create images for a tile based game we play. 6 months ago I was able to create a table with collapsed borders and 0px padding, margins, and borders, then draw my image with 207 x 207 JPEG TDs in multiple TR rows, then place another GIF image over all the JPEGs with transparent edges. Doing this for a table that was 6 tiles (207px) wide and 4 tiles deep, at ctrl 0, displayed a Firefox combined image that was exactly 1242px x 828px that was completely visible on 24 inch 1920 x 1080 DELL monitor. This allowed me to right click an empty space on my Firefox screen and select Take Screenshot to click on the GIF overlay image and capture that image with all of the tiles that were behind its transparent edges. For some reason, I have no idea why, my 207px by 207px tile images are now being displayed as 282px by 282px at ctrl 0, and the overall image is now too large to fit on the screen, so taking a screenshot of the proper sized image is no longer possible. For example, at ctrl- ctrl-, the tile images are 221 pixels square, which should be 1326 pixels wide for 6 tiles, but my 1242px wide GIF file displays at 1330 pixels wide, probably due to some kind of rounding error. I was able to use about:config and change layout.css.devPixelsPerPx from -1.0 to 0.74 and it did solve the problem. But it does so with a lot of warning for changing that default value! So my question is simple: how does Firefox, on Windows 10, determine its screen pixel to Image px relationship? I need to know what to look at for the proper way to get my px to pixel ratio back to 1 to 1. This is what the working image looks like while designing the center scoreboard tile https://user-media-prod-cdn.itsre-sumo.mozilla.net/uploads/images/2022-08-23-13-36-34-2fa67f.png and this is what the final image looks like when you take a screenshot of the image https://user-media-prod-cdn.itsre-sumo.mozilla.net/uploads/images/2022-08-23-13-36-53-beae42.png
已附加屏幕截图

被采纳的解决方案

You can look at this thread:

  • /questions/1384204 SINCE THE LAST UPDATE, THE FIREFOX SCREEN DOES NOT FIT MY SYSTEM SETTING(125%)

If setting browser.display.os-zoom-behavior = 0 doesn't work for you then you can create a new Number pref on the about:config page and set its value to 100.

Paste ui.textScaleFactor in the search bar and select the Number radio button and click the '+' button to add the new Number pref, enter the value (100) and click the blue OK button to confirm.

  • about:config => ui.textScaleFactor = 100

You can open the about:config page via the location/address bar. You can accept the warning and click "I accept the risk!" to continue.

定位到答案原位置 👍 0

所有回复 (2)

more options

选择的解决方案

You can look at this thread:

  • /questions/1384204 SINCE THE LAST UPDATE, THE FIREFOX SCREEN DOES NOT FIT MY SYSTEM SETTING(125%)

If setting browser.display.os-zoom-behavior = 0 doesn't work for you then you can create a new Number pref on the about:config page and set its value to 100.

Paste ui.textScaleFactor in the search bar and select the Number radio button and click the '+' button to add the new Number pref, enter the value (100) and click the blue OK button to confirm.

  • about:config => ui.textScaleFactor = 100

You can open the about:config page via the location/address bar. You can accept the warning and click "I accept the risk!" to continue.

more options

Thank you for the reply. My problem is now fixed!

I went back to about:config and looked for browser.display.os-zoom-behavior, and it was set to a value of 1, so as recommended, I change the value to 0.

As expected, because of my other change (layout.css.devPixelsPerPx set to 0.74), my images were now smaller than they should be! So, I then change the layout.css.devPixelsPerPx back to a -1.0 and everything is working fine.

Do you have any idea what might have caused the os-zoom-behavior to change, was there an update?