CARIS HPD : Portrayal : Portrayal Files : TrueType Symbol Files
 

TrueType Symbol Files

Paper chart portrayal can use TrueType symbology. TrueType symbols (and fonts) are infinitely scalable vector representations, TrueType files (TTF) are a binary file which must be edited with a TTF editor, but also can be modified at display time by the use of a definition file.

Individual TrueType characters or components in the TTF file are known as ’glyphs’. The CARIS TrueType definition file references these glyphs with display instructions (size, colour etc.) in order to produce the desired result on-screen and in-print.

Example TrueType definition files can be found in ~\system\PCEConfig\samples. The XML definition file and TTF files must be in the same directory. The TTF files are not required to be installed in the operating system. To use multiple TTF files, a <CompositeSymbolSet> must be defined in the Portrayal Control File

TrueType definition file elements

Element

Definition

Example

Symbol Name

Identifies symbol

"Square"

Angle

Orientation of symbol in degrees, counter clockwise

0.0

Description

Text description

Black square

SizeMM

Overall size in mm on chart

0.2

Components

Multiple components can be included

Component

An element for one component i.e. one glyph

Angle

Orientation of this component in degrees, CCW

0

Colour

Colour token for glyph

Black

Face

The TrueType Font name

Squares

Char

Individual character code (can be seen in Windows Character Map)

0x25A1

File

Name of TTF file. Must be in same folder as XML file

Arial.TTF

OffsetMM

X & Y Offset in mm on chart for the origin of the glyph

SizeMM

Height of this component in mm on chart

0.2

The definition of a TrueType symbol can reference one or multiple glyphs, with drawing instructions for each element. These are combined to form the final symbol.

Simple Example using a glyph from the Arial font file.

<Symbol Name="SQUARE">

  <Angle>0.0</Angle>

  <Description>Black square</Description>

  <SizeMM>0.2</SizeMM>

  <Components>

    <Component>

      <Angle>0</Angle>

      <Colour>Black</Colour>

      <Face>Arial</Face>

      <Char>0x25A1</Char>

      <File>Arial.ttf</File>

      <OffsetMM>

        <Y>0</Y>

        <X>0</X>

      </OffsetMM>

      <SizeMM>0.2</SizeMM>

    </Component>

  </Components>

</Symbol>

 

Example using multiple components

<Symbol Name="WHITECIRCLE">

  <Angle>0.0</Angle>

  <Description>White circle with black outline</Description>

  <SizeMM>4.0</SizeMM>

  <Components>

    <Component>

      <Angle>0</Angle>

      <Colour>Black</Colour>

      <Face>River Charts symbols</Face>

      <Char>0xB0</Char>

      <File>River Charts symbols.ttf</File>

      <OffsetMM>

        <Y>0</Y>

        <X>0</X>

      </OffsetMM>

      <SizeMM>4.0</SizeMM>

    </Component>

    <Component>

      <Angle>0</Angle>

      <Colour>White</Colour>

      <Face>River Charts symbols</Face>

      <Char>0xB0</Char>

      <File>River Charts symbols.ttf</File>

      <OffsetMM>

        <Y>0</Y>

        <X>0</X>

      </OffsetMM>

      <SizeMM>3.9</SizeMM>

    </Component>

  </Components>

</Symbol>