Importing fonts

The default font family in Kanzi is Fira Sans Regular. The font file is stored in <KanziInstallation>/Studio/Asset Library/Fonts. When you want to use your own font, import it to your Kanzi Studio project.

You can use these font types in your Kanzi applications:

Make sure that the font you use includes all the glyphs for the text that you want to include in your Kanzi application.

Importing fonts to a Kanzi Studio project

To import fonts to your project:

  1. Select File > Import > Import Fonts.

    The Import Fonts window opens.

    ../../_images/file-import-fonts.png
  2. In the Fonts column select the font that you want to import and in the Typefaces column double-click the typefaces that you want to select for importing.

    When you open the Import Fonts window, Kanzi Studio shows system fonts. To import fonts from a different location, click Browse and select the directory from which you want to import fonts.

    ../../_images/import-fonts.png
  3. When you are done selecting the typefaces that you want to import, click Import.

  4. You can see all imported fonts in the Library > Font Families.

    ../../_images/font-families-in-library.png ../../_images/font-family-properties.png

iType linked fonts

Use the iType linked fonts to link several TrueType fonts and use glyphs from all the linked fonts by referring to a single font file. For example, you can link a font with Latin glyphs and a font with Chinese glyphs to render in your Kanzi application the glyphs used in both languages.

Requirements

To create iType linked font files, you need Monotype iType FontLinking Kit for iType 5.3.3.

To use the iType linked font files, you need the Kanzi Engine plugin that adds the iType font engine to Kanzi. Submit the request for the Kanzi iType font engine through support.rightware.com.

Installing the iType font engine

To install the iType font engine:

  1. Extract the zip file that contains the iType font engine Kanzi Engine plugin.

  2. Copy the dll file for each build configuration to the <KanziInstallation>/Studio/Bin/EnginePlugins directory.

    For example, copy the GL_vs<Version>_Release/kzitypeplugin.dll to the <KanziInstallation>/Studio/Bin/EnginePlugins/GL_vs<Version>_Release directory.

Using the iType linked fonts

To use the iType linked fonts:

  1. In Windows Explorer add the ttf font files that you want to link to the <ProjectName>/Application/bin directory.

  2. To create an ltt linked font file, in the iType FontLinking Kit open the FontLinker tool:

    1. In the Edit menu select Modify.

      The Font Link window opens.

      ../../_images/modify-linked-font.png
    2. In the Font Link window click Add Font and select the ttf font files you added to the Application/bin directory in the first step.

      ../../_images/add-font.png ../../_images/added-fonts.png
    3. In the Font Link window for each ttf font file you imported in the previous step enable the checkbox and click Apply. After you add all the fonts that you want to link, click OK.

      ../../_images/font-checkbox.png ../../_images/click-apply.png
    4. In the File menu select Save and save the linked font as an ltt file.

      ../../_images/save-font.png
  3. To use the linked font in Kanzi Studio:

    1. In Kanzi Studio import the ltt font you saved in the previous step. See Importing fonts to a Kanzi Studio project.

      In Kanzi Studio, you can see the linked font file in the Library > Font Families.

      The linked font file in the Fonts directory refers to the ttf font files located in the <ProjectName>/Application/bin directory.

      ../../_images/linked-font-file-in-library.png
    2. In the Node Tree select a Text Block or Text Box node where you want to use a linked font and in the Properties set the Font Family property to that font.

      In that Text Block or Text Box node you can now use the glyphs from all ttf files that you linked in an ltt linked font file.

      ../../_images/select-text-block.png ../../_images/set-font-property.png ../../_images/linked-font-in-preview1.png