Project

General

Profile

3537.patch

Sergey Ivanovskiy, 03/29/2018 07:07 AM

Download (1.09 KB)

View differences:

src/com/goldencode/p2j/ui/client/driver/web/res/p2j.fonts.js 2018-03-29 11:03:26 +0000
16 16
** 005 CA  20171109 Fixed a problem with font naming in Firefox (never use double-quotes, just 
17 17
*                   single quotes).
18 18
** 006 SBI 20180130 Changed getTextWidth/getTextHeight to check validity of font parameters.
19
** 007 SBI 20180329 Changed derivedFont due to window.devicePixelRatio reflects zooming in browser.
19 20
*/
20 21
/*
21 22
** This program is free software: you can redistribute it and/or modify
......
231 232
   me.deriveFont = function(font)
232 233
   {
233 234
      var fd = fontTable[font];
234
      var size = Math.round(window.devicePixelRatio * fd.size);
235
      
236
      // we can't use window.devicePixelRatio since it reflects browser's zoom factor and
237
      // window.devicePixelRatio = 1 for desktop
238
      var size = Math.round(/*window.devicePixelRatio * */fd.size);
235 239
      
236 240
      if (fd.size != size)
237 241
      {