# Namespace: Fonts

## UI. Fonts

A namespace which contains Font APIs for the UI.

### Example

    WebViewer(...)
    .then(function (instance) {
      instance.UI.Fonts.getFonts();
    });

### Methods

#### <static> addAnnotationFont(font)

  Add a font to be available in the UI for Annotation font pickers.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `font` | String | The font to be added.

  ##### Example

      WebViewer(...)
         .then(function(instance) {
          instance.UI.Fonts.addAnnotationFont("Arial");
        });

#### <static> addSignatureFont(font)

  Add a font to be available in the UI for Signature font pickers.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `font` | String | The font to be added.

  ##### Example

      WebViewer(...)
         .then(function(instance) {
          instance.UI.Fonts.addSignatureFont("Arial");
        });

#### <static> getAnnotationFonts()

  Return the currently available fonts in the UI to be used for Annotations.

  ##### Returns:

  Fonts avaialable in the UI.
  Type
    Array.<String>

  ##### Example

      WebViewer(...)
         .then(function(instance) {
          instance.UI.Fonts.getAnnotationFonts();
        });

#### <static> getSignatureFonts()

  Returns the currently available fonts to be used when typing a signature in the signature dialog

  ##### Returns:

  Fonts avaialable in the UI.
  Type
    Array.<String>

#### <static> removeAnnotationFont(font)

  Remove a font from the UI's Annotation font pickers.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `font` | String | The font to be removed.

  ##### Example

      WebViewer(...)
         .then(function(instance) {
          instance.UI.Fonts.removeAnnotationFont("Arial");
        });

#### <static> removeSignatureFont(font)

  Remove a font from the UI's Signature font pickers.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `font` | String | The font to be removed.

  ##### Example

      WebViewer(...)
         .then(function(instance) {
          instance.UI.Fonts.removeSignatureFont("Arial");
        });

#### <static> setAnnotationFonts(fonts)

  Set the fonts available in the UI's Annotation font pickers.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `fonts` | Array.<String> | The fonts to be set.

  ##### Example

      WebViewer(...)
         .then(function(instance) {
          instance.UI.Fonts.setAnnotationFonts(["Arial", "Times New Roman"]);
        });

#### <static> setSignatureFonts(fonts)

  Set the fonts available in the UI's Signature font pickers.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `fonts` | Array.<String> | The fonts to be set.

  ##### Example

      WebViewer(...)
         .then(function(instance) {
          instance.UI.Fonts.setSignatureFonts(["Arial", "Times New Roman"]);
        });

#### Search results