helpcenter/Web/Controls/Help/Server/Windows/Document/InstallFonts/InstallFonts.ascx
2018-05-16 11:31:02 +03:00

87 lines
7.9 KiB
Plaintext

<%@ Control Language="C#" Inherits="BaseContentUserControls"%>
<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %>
<script runat="server">
protected override void Init()
{
PageTitle = PageCaption = "Adding new fonts, languages and spellcheckers to Document Server";
MetaKeyWords = "";
MetaDescription = "Learn how to add languages and spellcheckers to Document Server.";
}
</script>
<div class="main_buscall_container dataBackup">
<div class="MainHelpCenter">
<h1 class="subHeaderFeaturesCaption TipsCaption">Adding new fonts, languages and spellcheckers to Document Server</h1>
<cc:localizecontent runat="Server" controlname="~/Controls/Help/VariousControls/Versions/DocumentServer/DocumentServer_2_5.ascx" />
-
<cc:localizecontent runat="Server" controlname="~/Controls/Help/VariousControls/Versions/DocumentServer/DocumentServer_Current.ascx" />
<cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/VariousControls/Changelogs/DocumentServerChangelog.ascx" />
<div class="keyword_block">
<ul>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/local-server/local-server.ascx" /></li>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/server-version/server-version.ascx" /></li>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/document-server/document-server.ascx" /></li>
<li><cc:LocalizeContent runat="Server" ControlName="~/Controls/Help/Tags/windows-version/windows-version.ascx" /></li>
</ul>
</div>
<p>Sometimes you might want to add additional fonts or language spellchecking support to <b>Document Server</b> to enhance the work with the editors. That can be done quite easily.</p>
<h2 id="BareBonesInstructions">Bare Bones Instructions</h2>
<h5>Installing new fonts</h5>
<p>By default <b>Document Server</b> uses embedded free fonts (true type only in <code>.ttf</code> format) from the operating system where <b>Document Server</b> is installed. If you would like to use additional fonts you can do the following:</p>
<ol>
<li>Install the font by copying it to <code>C:\Windows\Font</code> (to the computer with <b>Document Server</b> installed).</li>
<li>Go to the <code>C:\Program Files\ONLYOFFICE\DocumentServer\bin\</code> folder and run the <code>documentserver-generate-allfonts.bat</code> file as administrator.
<p>It will scan the system font folder for the installed font, the font will be used by the <code>AllFonts.js</code> script to form the font thumbnails in the editors and add the font metrics to the <code>font_selection.bin</code> file for its further usage.</p>
</li>
<li>Restart the <b>ONLYOFFICE DocumentServer Converter</b> and <b>ONLYOFFICE DocumentServer DocService</b> services.</li>
<li>Clear the browser cache and reopen the page.</li>
</ol>
<h5>Adding new language spellchecking support</h5>
<p><b>Document Server</b> uses <a target="_blank" href="http://hunspell.sourceforge.net/">Hunspell</a> compatible format spellchecking service. This allows to easily increase the number of supported languages, which is limited by default. To add a language you will need the following:</p>
<ol>
<li>Put the language both affix (<code>.aff</code>) and dictionary (<code>.dic</code>) files in the Hunspell format to the <code>C:\Program Files (x86)\Ascensio System SIA\ONLYOFFICE Online Editors\SpellCheckerService\SpellChecker\Dictionaries\[lanugage_name]</code> folder.
<br />
<br />
<em class="example">For Spanish it will be <b>es_ES</b> folder:
<br />C:\Program Files (x86)\Ascensio System SIA\ONLYOFFICE Online Editors\SpellCheckerService\SpellChecker\Dictionaries\es_ES
</em>
<br />
</li>
<li>Restart the SpellChecker service.</li>
</ol>
<h2 id="HelpfulHints">Helpful Hints</h2>
<p><b>Document Server</b> always has a certain set of fonts with it. When installed it will check the presence of the following font files in the system: <code>arial.ttf</code>, <code>calibri.ttf</code>, <code>cour.ttf</code>, <code>symbol.ttf</code>, <code>times.ttf</code>, <code>wingding.ttf</code>.</p>
<p>When a document is opened for the first time, <b>Document Server</b> will check which fonts are present in the document and uploads it from the computer with <b>Document Server</b> installation. In case the document contains fonts absent from the <b>Document Server</b> computer, it will upload the closest font substitute (the document layout and display might suffer from such substitution).</p>
<p>In case you want to limit the number of fonts uploaded from the system, you can do the following:</p>
<ul>
<li><a href="<%=VirtualPathUtility.ToAbsolute("~/server/windows/document/remove-fonts.aspx")%>">Remove</a> the unused fonts from the system;</li>
<li>limit the number of fonts in documents used (using only most spread fonts: Times New Roman, Verdana, Tahoma, etc.);</li>
<li>use compression (dynamic and static) in IIS.</li>
</ul>
<h5>Installing new fonts for older Document Server versions</h5>
<p>If you are still using versions <b>3.0</b> - <b>3.5</b> of <b>Document Server</b> for Windows we recommend that you upgrade to the latest available version. If you do not have the possibility to upgrade and need to add a new font, the succession of actions should be the following:</p>
<ol>
<li>Install the font by copying it to <code>C:\Windows\Font</code> (to the computer with <b>Document Server</b> installed).</li>
<li>Run the command prompt with administrator rights.</li>
<li>Switch to the <code>C:\Program Files (x86)\Ascensio System SIA\ONLYOFFICE DocumentServer\Tools</code> folder (or use the path to the folder with <b>Document Server</b> installed):
<pre><code>cd C:\Program Files (x86)\Ascensio System SIA\ONLYOFFICE DocumentServer\Tools
</code></pre>
</li>
<li>Execute the <code>AllFontsGen.exe</code> command with the following parameters:
<pre><code>AllFontsGen.exe "C:\Windows\Fonts" "C:\Program Files (x86)\Ascensio System SIA\ONLYOFFICE DocumentServer\DocService\OfficeWeb\sdk\Common\AllFonts.js" "C:\Program Files (x86)\Ascensio System SIA\ONLYOFFICE DocumentServer\DocService\OfficeWeb\sdk\Common\Images" "C:\Program Files (x86)\Ascensio System SIA\ONLYOFFICE DocumentServer\FileConverterService\Bin\font_selection.bin"
</code></pre>
It will scan the system font folder for the installed font, the font will be used by the <code>AllFonts.js</code> script to form the font thumbnails in the editors and add the font metrics to the <code>font_selection.bin</code> file for its further usage.
</li>
<li>Restart the ONLYOFFICE Converter Service.</li>
<li>Clear the browser cache and reopen the page.</li>
</ol>
<p>If you are still using the older <b>2.5</b> version of <b>Document Server</b> for Windows we recommend that you upgrade to the latest available version. If you do not have the possibility to upgrade and need to add a new font, the succession of actions should be the following:</p>
<ol>
<li>Install the font by copying it to <code>C:\Windows\Font</code> (to the computer with <b>Document Server</b> installed).</li>
<li>Open the <code>C:\Program Files\Ascensio System SIA\ONLYOFFICE Online Editors\Tools</code> folder.</li>
<li>Run the <b>GenerateAllFonts.bat</b> file.</li>
<li>Clear the browser cache and reopen the page.</li>
</ol>
</div>
</div>