Merge pull request #2047 from ONLYOFFICE/fix/font-name

Change font family name
This commit is contained in:
Julia Radzhabova 2022-11-11 15:10:01 +03:00 committed by GitHub
commit 0f30f41b39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 10 deletions

View file

@ -194,7 +194,7 @@
} / false / true // if false/true - use as init value in de/pe. use instead of customization.spellcheck parameter
},
font: {
family: "Arial",
name: "Arial",
},
chat: true,
comments: true,

View file

@ -381,8 +381,8 @@ define([
Common.Utils.InternalSettings.set("save-guest-username", !!value);
}
if (this.appOptions.customization.font) {
if (this.appOptions.customization.font.family && typeof this.appOptions.customization.font.family === 'string') {
var arr = this.appOptions.customization.font.family.split(',');
if (this.appOptions.customization.font.name && typeof this.appOptions.customization.font.name === 'string') {
var arr = this.appOptions.customization.font.name.split(',');
for (var i=0; i<arr.length; i++) {
var item = arr[i].trim();
if (item && (/[\s0-9\.]/).test(item)) {
@ -1432,7 +1432,7 @@ define([
}
} else if (!this.appOptions.isDesktopApp && !this.appOptions.canBrandingExt &&
this.editorConfig && this.editorConfig.customization && (this.editorConfig.customization.loaderName || this.editorConfig.customization.loaderLogo ||
this.editorConfig.customization.font && this.editorConfig.customization.font.family)) {
this.editorConfig.customization.font && this.editorConfig.customization.font.name)) {
Common.UI.warning({
title: this.textPaidFeature,
msg : this.textCustomLoader,

View file

@ -340,8 +340,8 @@ define([
Common.Utils.InternalSettings.set("save-guest-username", !!value);
}
if (this.appOptions.customization.font) {
if (this.appOptions.customization.font.family && typeof this.appOptions.customization.font.family === 'string') {
var arr = this.appOptions.customization.font.family.split(',');
if (this.appOptions.customization.font.name && typeof this.appOptions.customization.font.name === 'string') {
var arr = this.appOptions.customization.font.name.split(',');
for (var i=0; i<arr.length; i++) {
var item = arr[i].trim();
if (item && (/[\s0-9\.]/).test(item)) {
@ -1054,7 +1054,7 @@ define([
}
} else if (!this.appOptions.isDesktopApp && !this.appOptions.canBrandingExt &&
this.editorConfig && this.editorConfig.customization && (this.editorConfig.customization.loaderName || this.editorConfig.customization.loaderLogo ||
this.editorConfig.customization.font && this.editorConfig.customization.font.family)) {
this.editorConfig.customization.font && this.editorConfig.customization.font.name)) {
Common.UI.warning({
title: this.textPaidFeature,
msg : this.textCustomLoader,

View file

@ -378,8 +378,8 @@ define([
Common.Utils.InternalSettings.set("save-guest-username", !!value);
}
if (this.appOptions.customization.font) {
if (this.appOptions.customization.font.family && typeof this.appOptions.customization.font.family === 'string') {
var arr = this.appOptions.customization.font.family.split(',');
if (this.appOptions.customization.font.name && typeof this.appOptions.customization.font.name === 'string') {
var arr = this.appOptions.customization.font.name.split(',');
for (var i=0; i<arr.length; i++) {
var item = arr[i].trim();
if (item && (/[\s0-9\.]/).test(item)) {
@ -1139,7 +1139,7 @@ define([
}
} else if (!this.appOptions.isDesktopApp && !this.appOptions.canBrandingExt && !(this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge || this.appOptions.isEditOle) &&
this.editorConfig && this.editorConfig.customization && (this.editorConfig.customization.loaderName || this.editorConfig.customization.loaderLogo ||
this.editorConfig.customization.font && this.editorConfig.customization.font.family)) {
this.editorConfig.customization.font && this.editorConfig.customization.font.name)) {
Common.UI.warning({
title: this.textPaidFeature,
msg : this.textCustomLoader,