Set font hinting as Windows by default

This commit is contained in:
Julia Radzhabova 2020-02-17 11:57:44 +03:00 committed by Alexey Golubev
parent d041247d7b
commit 2ff37df87b
8 changed files with 11 additions and 7 deletions

View file

@ -166,7 +166,7 @@ define([
var value = Common.localStorage.getItem("de-settings-fontrender");
if (value === null)
window.devicePixelRatio > 1 ? value = '1' : '0';
value = '0';
Common.Utils.InternalSettings.set("de-settings-fontrender", value);
// Initialize api

View file

@ -444,7 +444,7 @@ define([
value = Common.Utils.InternalSettings.get("de-settings-fontrender");
item = this.cmbFontRender.store.findWhere({value: parseInt(value)});
this.cmbFontRender.setValue(item ? item.get('value') : (window.devicePixelRatio > 1 ? 1 : 0));
this.cmbFontRender.setValue(item ? item.get('value') : 0);
value = Common.Utils.InternalSettings.get("de-settings-unit");
item = this.cmbUnit.store.findWhere({value: value});

View file

@ -94,7 +94,7 @@ define([
var value = Common.localStorage.getItem("de-settings-fontrender");
if (value === null) {
window.devicePixelRatio > 1 ? value = '1' : '0';
value = window.devicePixelRatio > 1 ? '1' : '0';
}
// Initialize api

View file

@ -153,7 +153,7 @@ define([
}
var value = Common.localStorage.getItem("pe-settings-fontrender");
if (value===null) value = window.devicePixelRatio > 1 ? '1' : '3';
if (value===null) value = '3';
Common.Utils.InternalSettings.set("pe-settings-fontrender", value);
// Initialize api

View file

@ -379,7 +379,7 @@ define([
value = Common.Utils.InternalSettings.get("pe-settings-fontrender");
item = this.cmbFontRender.store.findWhere({value: parseInt(value)});
this.cmbFontRender.setValue(item ? item.get('value') : (window.devicePixelRatio > 1 ? Asc.c_oAscFontRenderingModeType.noHinting : Asc.c_oAscFontRenderingModeType.hintingAndSubpixeling));
this.cmbFontRender.setValue(item ? item.get('value') : Asc.c_oAscFontRenderingModeType.hintingAndSubpixeling);
value = Common.Utils.InternalSettings.get("pe-settings-unit");
item = this.cmbUnit.store.findWhere({value: value});

View file

@ -134,6 +134,10 @@ define([
uiApp.params.notificationCloseButtonText = me.textClose;
if (me.api){
var value = Common.localStorage.getItem("pe-settings-fontrender");
if (value===null) value = window.devicePixelRatio > 1 ? '1' : '3';
me.api.SetFontRenderingMode(parseInt(value));
Common.Utils.Metric.setCurrentMetric(1); //pt
me.api.SetDrawingFreeze(true);

View file

@ -155,7 +155,7 @@ define([
}
var value = Common.localStorage.getItem("sse-settings-fontrender");
if (value===null) value = window.devicePixelRatio > 1 ? '1' : '3';
if (value===null) value = '3';
Common.Utils.InternalSettings.set("sse-settings-fontrender", value);
// Initialize api

View file

@ -893,7 +893,7 @@ define([
value = Common.Utils.InternalSettings.get("sse-settings-fontrender");
item = this.cmbFontRender.store.findWhere({value: parseInt(value)});
this.cmbFontRender.setValue(item ? item.get('value') : (window.devicePixelRatio > 1 ? Asc.c_oAscFontRenderingModeType.noHinting : Asc.c_oAscFontRenderingModeType.hintingAndSubpixeling));
this.cmbFontRender.setValue(item ? item.get('value') : Asc.c_oAscFontRenderingModeType.hintingAndSubpixeling);
value = Common.Utils.InternalSettings.get("sse-settings-unit");
item = this.cmbUnit.store.findWhere({value: value});