MozillaZine

FF 22 and systemDefaultScale problem

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
pkirill
 
Posts: 1
Joined: June 27th, 2013, 3:09 am

Post Posted June 27th, 2013, 3:43 am

Hi,

We are writing an application which has a canvas occupying the whole client window area.
Since the 22th version of Firefox, the FF starts looking at the SystemDefaultScale parameter.
I have a Hi-DPI display so that I use 125% so far and now it affects FF behavior.

My client area of the whole window used to be (version < 22) 1920 pixels wide, but after the update to the 22th, it is 1536, which corresponds to the System 125%.

This make a following problem: the canvas looks blurry. It is being up-scaled to natural 1920 resolution.
My question is: is there a way to read the systemDefaultScale in the JavaScript and adjust the canvas rendering resolution accordingly.

DanRaisch
Moderator

User avatar
 
Posts: 117379
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Post Posted June 27th, 2013, 4:45 am

Moving to Firefox Support.

dfoulkes

User avatar
 
Posts: 22114
Joined: June 28th, 2008, 10:31 pm
Location: Mesquite, Nevada

Post Posted June 27th, 2013, 7:34 am

There seems to be a fairly large number of posts here to the Support area that relate to some changes in displaying... not all of them seem to relate to your exact situation ... but, you might want to peruse the titles here in Support for stuff that has to do with font/display situations with the new release.
As you can see she's (The CAT) always alert and on the prowl for Meoware !!

Gingerbread Man

User avatar
 
Posts: 7450
Joined: January 30th, 2007, 10:55 am

Post Posted June 27th, 2013, 9:26 am

Hello,

Open the Help menu and choose Submit Feedback to send a comment to Mozilla about this feature.
pkirill wrote:This make a following problem: the canvas looks blurry.

To undo the change locally,
  1. Set layout.css.devPixelsPerPx to 1.0 in about:config.
  2. Interface text will then look significantly smaller. Set it to something like 15pt using either Stylish or userChrome.css
pkirill wrote:My question is: is there a way to read the systemDefaultScale in the JavaScript and adjust the canvas rendering resolution accordingly.


jscher2000

User avatar
 
Posts: 10077
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA

Post Posted June 27th, 2013, 5:23 pm

Gingerbread Man, this media query thing is very interesting. After a few minutes of reading, I think one could set base sizes in a series of rules like the following (not tested):

Code: Select all
/* Standard */
@media screen and (max-resolution: 96dpi) { ... }

/* 1-25% DPI increase */
@media screen and (min-resolution: 97dpi) and (max-resolution: 120dpi) { ... }

/* 26-50% DPI increase */
@media screen and (min-resolution: 121dpi) and (max-resolution: 144dpi) { ... }

/* >50% DPI increase */
@media screen and (min-resolution: 145dpi) { ... }


In theory one also can use the ratio directly, but cross-browser support may be limited:

Code: Select all
/* Standard */
@media screen and (max-resolution: 1.0dppx) { ... }

/* 1-25% DPI increase */
@media screen and (min-resolution: 1.05dppx) and (max-resolution: 1.25dppx) { ... }

/* 26-50% DPI increase */
@media screen and (min-resolution: 1.30dppx) and (max-resolution: 1.5dppx) { ... }

/* >50% DPI increase */
@media screen and (min-resolution: 1.55dppx) { ... }

Return to Web Development / Standards Evangelism


Who is online

Users browsing this forum: No registered users and 1 guest