Configuring Siebel Open UI > Customizing Styles, Applets, Fields, and Controls > Customizing Logos, Themes, Backgrounds, Tabs, Styles, and Fonts >
Adding Fonts to Siebel Open UI
This topic describes how to add custom fonts to Siebel Open UI. Although you can add custom fonts, it is recommended that your Siebel Open UI deployment use only Web-safe fonts because you might not be able to control font usage. For example, assume you deploy a custom font to all users in your company, and that you also add this font to Siebel Open UI. Assume that one of your Siebel Open UI users chooses this font in a text editor in Siebel Open UI, and then sends this text in an email message to an external customer who has not installed this custom font on their computer. In this situation, your Siebel Open UI user can read the font but the external customer cannot read it. Using Web-safe fonts helps to make sure that any Browser or other client, such as a desktop computer or mobile device, can correctly render the text that your users provide, regardless of how each user configures font usage in their individual Browsers or clients, or the level of font customization that exists in your deployment environment. For more information about Web-safe fonts, see the topic that describes Web Safe Font Combinations at http://www.w3schools.com/cssref/css_websafe_fonts.asp. To add fonts to Siebel Open UI
- Create a JavaScript file that adds your custom font:
- Create a new JavaScript file named ckeditorfontadditions.js, and then save this file in the
custom folder.
For more information about this folder, see Organizing Files That You Customize.
- Add the following code to the file that you created in Step a. This code adds the fonts that Siebel Open UI displays in the Font picklists when the user edits text in the client:
if (typeof(SiebelAppFacade.CKEDITOREXTN) == "undefined") {
Namespace('SiebelAppFacade.CKEDITOREXTN');
(function() {
SiebelApp.EventManager.addListner("postload", ckeditorextn, this);
var updatedFont = "";
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.
}
}
}());
}
where:
';Calibri/Calibri, Verdana, Geneva, sans-serif;'
For more information about how to specify the font family, see Specifying Font Families.
- Administer the manifest:
For more information about how to do this step, see Configuring Manifests.
- Log in to the client as an administrator.
- Navigate to the Administration - Application screen, and then the Manifest Files view.
- In the Files list, add the file that you created in Step 2.
You add the following record:
siebel/custom/ckeditorfontadditions.js
- Navigate to the Administration - Application screen, and then the Manifest Administration view.
- In the UI Objects list, add a new record. Use values from the following table.
|
|
|
Application |
Common |
PLATFORM INDEPENDENT |
- In the Object Expression list, add the following subexpression.
|
|
Group Name |
Leave empty. |
Expression |
Desktop |
Level |
1 |
Operator |
Leave empty. |
Web Template Name |
Leave empty. |
- In the Files list, add the file that you created in Step 2.
You add the following record:
siebel/custom/ckeditorfontadditions.js
- Refresh the manifest. Log out of the client, and then log back in to the client.
- Verify that Siebel Open UI added your custom fonts:
- Navigate to the Administration Communications screen, and then the All Templates view.
- In the Compose Template section, in the Text window, click the Font drop-down, and then make sure the Font list displays the font that you specified in Step 1, Step b.
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.
where:
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:
- Uses Verdana for My Font.
- If Verdana is not installed on the client computer, then it uses Geneva for My Font.
- 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.
|