Specifying Font Families

You can use the following code to specify the font family:

function ckeditorextn() {   
  try {   
    if (CKEDITOR &&   
      CKEDITOR.config.font_names !== updatedFont) {   
      CKEDITOR.config.font_names = CKEDITOR.config.font_names +   
        'font_families'   
      updatedFont = CKEDITOR.config.font_names;   
    }   
  } catch (error) {   
    // Nothing to do.

In this code sample, font_families specifies one or more font families that Siebel Open UI uses to render the font.

font_families can include one or more families. You must precede each font family with a semi-colon (;). For example:

;font_family_1;font_family_2;font_family_n

You must use the following format for each font family:

font_name/font_label,substitute_font_1,substitute_font_2, substitute_font_n, 
generic_font_family

where:

  • font_name specifies the name of the font, such as Calibri.

  • font_label specifies the text label. It displays this label in the Font picklists in the client.

  • substitute_font_1 specifies the font if the font that font_name specifies does not exist in the client computer.

  • substitute_font_2 specifies the font if the font that substitute_font_1 specifies does not exist in the client computer.

  • generic_font_family specifies the font family if the font that substitute_font_n specifies does not exist in the client computer. Siebel Open UI chooses a font from this generic font family.

It is recommended that you specify a substitution font that resembles the font that it substitutes. For example, Calibri is a sans-serif, proportionally spaced font. If you specify Calibri as the font_name, then it is recommended that you specify a close approximation to Calibri for substitute_font_1, such as Verdana, which is also a sans-serif, proportionally spaced font. It is recommended that you use this same approach when you specify the remaining substitution fonts. For example, specify Geneva for substitute_font_2.

Consider the following example:

';Calibri/My Font, Verdana, Geneva, sans-serif;'

This code configures Siebel Open UI to do the following:

  • Adds Calibri to the list of fonts that Siebel Open UI displays in Font picklists.

  • Uses My Font as the label for the Calibri font that Siebel Open UI displays in Font picklists.

  • If Calibri is not installed on the client computer, then Siebel Open UI uses the following sequence to determine the font that it displays:

    1. Uses Verdana for My Font.

    2. If Verdana is not installed on the client computer, then it uses Geneva for My Font.

    3. If Geneva is not installed on the client computer, then it uses any sans-serif font that is installed on the client computer for My Font.

If you specify a font that includes a space character, then you must use double-quotes to enclose the entire font name. For example, you must use double quotes to enclose Times New Roman and Courier New:

';"Times New Roman"/My Font,Georgia,"Courier New",Serif;'

For more information about font families, see the topic that describes the CSS font family property at the W3 Schools website at http://www.w3schools.com/cssref/pr_font_font-family.asp.