Commit 55e8b3f9 authored by Alexander.Trofimov's avatar Alexander.Trofimov

common/FontsFreeType/font_engine to function-closure

parent 118309ea
......@@ -39,6 +39,8 @@
* -----------------------------------------------------------------------------
*/
var asc = window["Asc"];
var FT_Common = AscFonts.FT_Common;
/**
* Отвечает за условное форматирование
......
......@@ -26,6 +26,7 @@
(function(window, undefined) {
// Import
var g_memory = AscFonts.g_memory;
var CellValueType = AscCommon.CellValueType;
var c_oAscCellAnchorType = AscCommon.c_oAscCellAnchorType;
var c_oAscBorderStyles = AscCommon.c_oAscBorderStyles;
......
......@@ -25,6 +25,8 @@
"use strict";
// Import
var g_memory = AscFonts.g_memory;
var CellValueType = AscCommon.CellValueType;
var c_oAscBorderStyles = AscCommon.c_oAscBorderStyles;
var fSortAscending = AscCommon.fSortAscending;
......
......@@ -47,6 +47,9 @@ var History = {};
window["Asc"] = {};
var Asc = window["Asc"];
window["AscFonts"] = {};
var AscFonts = window["AscFonts"];
window["AscCommon"] = {};
var AscCommon = window["AscCommon"];
......
......@@ -30,6 +30,8 @@
* Time: 12:01
*/
// Import
var g_memory = AscFonts.g_memory;
var FOREIGN_CURSOR_LABEL_HIDETIME = 1500;
......
......@@ -32,6 +32,8 @@
function (window, undefined) {
// Import
var g_memory = AscFonts.g_memory;
var c_oAscSizeRelFromH = AscCommon.c_oAscSizeRelFromH;
var c_oAscSizeRelFromV = AscCommon.c_oAscSizeRelFromV;
......
......@@ -24,6 +24,23 @@
*/
"use strict";
// Import
var FT_Get_Sfnt_Table = AscFonts.FT_Get_Sfnt_Table;
var FT_Matrix = AscFonts.FT_Matrix;
var FT_Set_Char_Size = AscFonts.FT_Set_Char_Size;
var FT_Set_Transform = AscFonts.FT_Set_Transform;
var __FT_CharmapRec = AscFonts.__FT_CharmapRec;
var FT_Set_Charmap = AscFonts.FT_Set_Charmap;
var FT_Get_Char_Index = AscFonts.FT_Get_Char_Index;
var FT_Load_Glyph = AscFonts.FT_Load_Glyph;
var FT_Get_Glyph = AscFonts.FT_Get_Glyph;
var FT_BBox = AscFonts.FT_BBox;
var FT_Glyph_Get_CBox = AscFonts.FT_Glyph_Get_CBox;
var FT_Done_Glyph = AscFonts.FT_Done_Glyph;
var FT_Outline_Decompose = AscFonts.FT_Outline_Decompose;
var FT_Render_Glyph = AscFonts.FT_Render_Glyph;
var raster_memory = AscFonts.raster_memory;
function CCMapIndex()
{
this.index = 0;
......
......@@ -22,9 +22,14 @@
* Pursuant to Section 7  3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*/
"use strict";
"use strict";
// Import
var FT_Open_Args = AscFonts.FT_Open_Args;
var FT_Library = AscFonts.FT_Library;
var FT_Set_Char_Size = AscFonts.FT_Set_Char_Size;
var raster_memory = AscFonts.raster_memory;
var AscBrowser = AscCommon.AscBrowser;
var g_bIsAppleDevices = AscBrowser.isAppleDevices;
......
......@@ -24,6 +24,8 @@
*/
"use strict";
(function(window, undefined){
function _FT_Common()
{
......@@ -126,7 +128,7 @@ function _FT_Common()
return ret;
}
}
var FT_Common = new _FT_Common();
var FT_Common = new _FT_Common();
/******************************************************************************/
// SERVICES
/******************************************************************************/
......@@ -384,7 +386,7 @@ function FT_ServiceCache()
this.service_GLYPH_DICT = null;
this.service_PFR_METRICS = null;
this.service_WINFNT = null;
}
}
/******************************************************************************/
// stream
/******************************************************************************/
......@@ -3957,7 +3959,7 @@ function ft_synthesize_vertical_metrics(metrics, advance)
metrics.vertBearingX = parseInt(metrics.horiBearingX - metrics.horiAdvance / 2);
metrics.vertBearingY = parseInt((advance - height) / 2);
metrics.vertAdvance = advance;
}
}
var ft_standard_glyph_names = [".null","nonmarkingreturn","notequal","infinity","lessequal","greaterequal","partialdiff","summation","product","pi","integral",
"Omega","radical","approxequal","Delta","nonbreakingspace","lozenge","apple","franc","Gbreve","gbreve","Idotaccent","Scedilla",
"scedilla","Cacute","cacute","Ccaron","ccaron","dcroat",".notdef","space","exclam","quotedbl","numbersign","dollar","percent",
......@@ -8046,7 +8048,7 @@ function create_psnames_module(library)
psnames_mod.generic = null;
return psnames_mod;
}
}
/******************************************************************************/
// t1tables
/******************************************************************************/
......@@ -12649,7 +12651,7 @@ function create_psaux_module(library)
return psaux_mod;
}
/******************************************************************************/
// bdf
/******************************************************************************/
......@@ -18180,7 +18182,7 @@ function create_sfnt_module(library)
return sfnt_mod;
}
function CRasterMemory()
{
this.width = 0;
......@@ -20626,7 +20628,7 @@ function ft_smooth_render_generic(render, slot, mode, origin, required_mode)
FT_Outline_Translate(outline, -origin.x, -origin.y);
return error;
}
}
var TT_Round_Off = 5;
var TT_Round_To_Half_Grid = 0;
var TT_Round_To_Grid = 1;
......@@ -27091,7 +27093,7 @@ function CSubpixHintingHacks()
};
}
var global_SubpixHintingHacks = new CSubpixHintingHacks();
var global_SubpixHintingHacks = new CSubpixHintingHacks();
/******************************************************************************/
// classes
/******************************************************************************/
......@@ -30927,7 +30929,7 @@ function create_tt_driver(library)
driver.clazz = new TT_Driver_Class();
return driver;
}
}
/******************************************************************************/
// cfftypes
/******************************************************************************/
......@@ -36894,7 +36896,7 @@ function create_cff_driver(library)
driver.memory = library.Memory;
return driver;
}
}
/******************************************************************************/
// afm
/******************************************************************************/
......@@ -40532,7 +40534,7 @@ function create_t1_driver(library)
driver.clazz = new T1_Driver_Class();
return driver;
}
}
var FT_Error = 0;
function FT_Library()
{
......@@ -41840,4 +41842,27 @@ function FT_CMap_New(clazz, init_data, charmap)
return cmap;
}
//--------------------------------------------------------export----------------------------------------------------
window['AscFonts'] = window['AscFonts'] || {};
window['AscFonts'].FT_Common = FT_Common;
window['AscFonts'].FT_Stream = FT_Stream;
window['AscFonts'].g_memory = g_memory;
window['AscFonts'].FT_Get_Sfnt_Table = FT_Get_Sfnt_Table;
window['AscFonts'].FT_BBox = FT_BBox;
window['AscFonts'].FT_Matrix = FT_Matrix;
window['AscFonts'].FT_Open_Args = FT_Open_Args;
window['AscFonts'].__FT_CharmapRec = __FT_CharmapRec;
window['AscFonts'].FT_Outline_Decompose = FT_Outline_Decompose;
window['AscFonts'].FT_Library = FT_Library;
window['AscFonts'].FT_Set_Char_Size = FT_Set_Char_Size;
window['AscFonts'].FT_Get_Char_Index = FT_Get_Char_Index;
window['AscFonts'].FT_Set_Charmap = FT_Set_Charmap;
window['AscFonts'].FT_Glyph_Get_CBox = FT_Glyph_Get_CBox;
window['AscFonts'].FT_Get_Glyph = FT_Get_Glyph;
window['AscFonts'].FT_Done_Glyph = FT_Done_Glyph;
window['AscFonts'].FT_Load_Glyph = FT_Load_Glyph;
window['AscFonts'].FT_Set_Transform = FT_Set_Transform;
window['AscFonts'].FT_Render_Glyph = FT_Render_Glyph;
window['AscFonts'].raster_memory = raster_memory;
})(window);
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
* In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
* Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
* THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
*
* Pursuant to Section 7  3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* relevant author attributions when distributing the software. If the display of the logo in its graphic
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
* in every copy of the program you distribute.
* Pursuant to Section 7  3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*/
"use strict";
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
* In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
* Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
* THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
*
* Pursuant to Section 7  3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* relevant author attributions when distributing the software. If the display of the logo in its graphic
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
* in every copy of the program you distribute.
* Pursuant to Section 7  3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*/
"use strict";
// Import
var FT_Common = AscFonts.FT_Common;
var FT_Stream = AscFonts.FT_Stream;
var g_memory = AscFonts.g_memory;
var charA = "A".charCodeAt(0);
var charZ = "Z".charCodeAt(0);
......
......@@ -43,6 +43,9 @@ window.document = document;
window["Asc"] = {};
var Asc = window["Asc"];
window["AscFonts"] = {};
var AscFonts = window["AscFonts"];
window["AscCommon"] = {};
var AscCommon = window["AscCommon"];
......
......@@ -25,6 +25,8 @@
"use strict";
// Import
var g_memory = AscFonts.g_memory;
var c_oAscShdClear = Asc.c_oAscShdClear;
var c_oAscColor = Asc.c_oAscColor;
var c_oAscFill = Asc.c_oAscFill;
......
......@@ -23,6 +23,7 @@
*
*/
"use strict";
var g_memory = AscFonts.g_memory;
function CPageMeta()
{
......
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
* In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
* Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
* THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
*
* Pursuant to Section 7  3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* relevant author attributions when distributing the software. If the display of the logo in its graphic
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
* in every copy of the program you distribute.
* Pursuant to Section 7  3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*/
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* This program is freeware. You can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html).
* In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that
* Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.
*
* THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR
* FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
*
* Pursuant to Section 7  3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* relevant author attributions when distributing the software. If the display of the logo in its graphic
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
* in every copy of the program you distribute.
* Pursuant to Section 7  3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*/
"use strict";
// Import
var g_memory = AscFonts.g_memory;
var fontslot_ASCII = 0x00;
var fontslot_EastAsia = 0x01;
var fontslot_CS = 0x02;
......
......@@ -25,6 +25,8 @@
"use strict";
// Import
var g_memory = AscFonts.g_memory;
var align_Right = AscCommon.align_Right;
var align_Left = AscCommon.align_Left;
var align_Center = AscCommon.align_Center;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment