MicroStrategy ONE

Use Custom Fonts for iOS

You can add a font that MicroStrategy Mobile does not support out-of-the-box and use it in a document viewed on a mobile device. You make the font available by adding a plug-in to MicroStrategy Web and then apply the font to the document. Depending on whether the font is supported in iOS, you may need to perform additional actions.

The steps below illustrate how to use a sample custom font, called Zapfino, which is supported in iOS by default.

  1. Copy FontPlugin to the plugins folder in your MicroStrategy Web installation directory. 
  2. Expand FontPlugin and navigate to WEB-INF/xml/config and open fontNamesPicker.xml. The contents of the file are shown below:

<shortcut-list name="fontPicker">

  <shortcut desc="Zapfino" name="pkrZapfino">

    <attributes>

      <attribute name="style" source="const" value="font-family:Zapfino"/>

      <attribute name="value" source="const" value="Zapfino"/>

    </attributes>

  </shortcut>

</shortcut-list>

  1. Restart the web server. 
  2. In MicroStrategy Web, create a document, add a label called "Test Zapfino Font", and set the label font to Zapfino
  3. Open MicroStrategy Mobile on your mobile device and view the document you created. The "Test Zapfino Font" label is displayed using the Zapfino font.

     

The steps below illustrate how to use a sample custom font, called Gauge-Regular, which is not supported in iOS by default. 

  1. Copy FontPlugin to the plugins folder in your MicroStrategy Web installation directory. 
  2. Expand FontPlugin and navigate to WEB-INF/xml/config. Open fontNamesPicker.xml and modify the font by changing the instances of "Zapfino" to "Gauge" or "Gauge-Regular", as shown below in bold. 

Before customization:

<shortcut-list name="fontPicker">

  <shortcut desc="Zapfino" name="pkrZapfino">

    <attributes>

      <attribute name="style" source="const" value="font-family:Zapfino"/>

      <attribute name="value" source="const" value="Zapfino"/>

    </attributes>

  </shortcut>

</shortcut-list>

After customization: 

<shortcut-list name="fontPicker">

  <shortcut desc="Gauge" name="pkrGauge">

    <attributes>

      <attribute name="style" source="const" value="font-family:Gauge"/>

      <attribute name="value" source="const" value="Gauge-Regular"/>

    </attributes>

  </shortcut>

</shortcut-list>

Save your changes. 

  1. Restart the web server. 
  2. In MicroStrategy Web, create a document, add a label called "Test Gauge Font", and set the label font to Gauge
  3. On your local machine, download the font file used in this example (Gauge-Regular.ttf) and save it. 
  1. In Xcode, open the MicroStrategyMobile project. 
    1. Add the font file to the project and confirm that it is available for the appropriate targets: 
      1. Drag and drop Gauge-Regular.ttf, the font file that you downloaded, into the Resources folder. 
      2. Select Gauge-Regular.ttf and make sure that the targets you want to use your font in is checked under “Target Membership” in the right-hand pane. 
      3. To confirm that the font file is available, choose the target, click Build Phases, expand Copy bundle resources, and make sure that Gauge-Regular.ttf is in the list. 
    1. Depending on the targets you want to use your font in, open the info_IPhone.plist or info_IPad.plist file and add a new row. 
      1. Give the new row the name UIAppFonts
      2. Xcode automatically changes the name to Fonts provided by application and adds one item (item 0) for you. 
      3. Set the value for item 0 to Gauge-Regular.ttf.
  1. Open MicroStrategy Mobile on your mobile device and view the document you created. The "Test Gauge Font" label is displayed using the Gauge-Regular font.