How to use different fonts in Knowledge Documents

Document ID : KB000041382
Last Modified Date : 14/02/2018
Show Technical Document Details

Summary: 

The Knowledge Document Editor may be used to add different fonts to a Knowledge Document.

The default dropdown offers a choice of eight fonts, but other fonts may also be used when writing a Knowledge Document.

This guide shows how to use different fonts, either as a "one off" or to permanently add them to the dropdown choice selection.

Background:

The default dropdown in the Knowledge Document "Edit Resolution" editor offers a font selection of:

  • Arial
  • Courier New
  • Georgia
  • Tahoma
  • Times New Roman
  • Verdana
  • Impact
  • Wingdings

 

Knowledge Document font choice - before adding Calibri FINAL.png

 

It is possible to specify different fonts for use by three methods.

  1. Edit Source
    Editing the Source of the HTML page enables you to specify any font or other HTML editing function.

    This method is best for "quick one off" and flexible changes.

  2. Add to Font Dropdown
    The Software Development Kit (SDK) may easily be used to add an extra font choice.

    This method is best for making a permanent change to the list of available fonts, for example, when there is a House Style font that should be used.

  3. Use an Attachment
    Using an attachment to a knowledge document, such as a PDF file, will preserve the exact display of the fonts and other formatting exactly as intended. 

    This method is best where exact fidelity of the original Knowledge Document is required, or where it is likely that a client will not have access to the font or other HTML components to display the document correctly. 

    The main disadvantage is that it requires the end user to open the file, rather than to have it displayed within the Knowledge Document.

This document looks at how to implement the first two methods, as Attachments are a separate feature.

 

Environment:  

The Knowledge Document feature of all versions of CA Service Desk Manager and ITSM.

Instructions: 

We will add the "Calibri" font to a Knowledge Document.

Note:  The end user's browser must have access to the font locally, or it will not display as anticipated.

Method 1: Edit Source

  1. Click the "Source" button within the "Edit Resolution" Knowledge Document Editor.

  2. Specify the font directly using standard HTML syntax. For example:
    <font face="Calibri" size="6">ABCDefgh: This text is Calibri.</font>
  3. Click the "Design" button to see the results, as below.

Knowledge Document font choice - Source code for Calibri.png

  

Method 2: Add to Font Dropdown

  1. Navigate to the file \Service Desk Manager\sdk\scripts\htmlarea.js.

  2. Edit it using a text editor, such as Notepad++.

    Knowledge Document font choice - before adding Calibri 1.png

  3. Add the fonts of choice and save the new file to the \site\mods location such as \Service Desk Manager\site\mods\www\wwwroot\scripts\htmlarea.js.

    Note: Do not overwrite the original \sdk\ located file.

    The "Calibri" font has been added in this example.

    this.fontname = {
    "Arial":   'arial,helvetica,sans-serif',
    "Calibri": 'Calibri',
    "Courier New":   'courier new,courier,monospace',
    "Georgia":   'georgia,times new roman,times,serif',
    "Tahoma":   'tahoma,arial,helvetica,sans-serif',
    "Times New Roman": 'times new roman,times,serif',
    "Verdana":   'verdana,arial,helvetica,sans-serif',
    "Impact":   'impact',
    "Wingdings":   'wingdings'
    Knowledge Document font choice - Adding Calibri via SDK.png

    Tip: You may wish to update "WingDings" to "Wingdings" and "impact" to "Impact" if this has not been done.

  4. Recycle CA Service Desk Manager and the changes will become apparent through the interface.

    Knowledge Document font choice - AFTER Adding Calibri via SDK.png


 

Additional Information:

 ITSM 14.1 Wiki: Knowledge Management