зеркало из https://github.com/mozilla/pjs.git
Bug 434157: Font scaling of Vista doesn't work as good with RC1 than it did with Betas, patch by roc@ocallahan.org, r=vlad, a=beltzner
This commit is contained in:
Родитель
7f2e426ff2
Коммит
beb1735989
|
@ -240,8 +240,12 @@ nsThebesDeviceContext::SetDPI()
|
|||
// dev pixels per CSS pixel. Then, divide that into AppUnitsPerCSSPixel()
|
||||
// to get the number of app units per dev pixel. The PR_MAXes are to
|
||||
// make sure we don't end up dividing by zero.
|
||||
mAppUnitsPerDevNotScaledPixel = PR_MAX(1, AppUnitsPerCSSPixel() /
|
||||
PR_MAX(1, dpi / 96));
|
||||
PRUint32 roundedDPIScaleFactor = (dpi + 48)/96;
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
roundedDPIScaleFactor = dpi/96;
|
||||
#endif
|
||||
mAppUnitsPerDevNotScaledPixel =
|
||||
PR_MAX(1, AppUnitsPerCSSPixel() / PR_MAX(1, roundedDPIScaleFactor));
|
||||
} else {
|
||||
/* set mAppUnitsPerDevPixel so we're using exactly 72 dpi, even
|
||||
* though that means we have a non-integer number of device "pixels"
|
||||
|
|
Загрузка…
Ссылка в новой задаче