# $ K + Opening a GTT file
You can open a GTT file from the workspace (see Launching a resource or GPD file editor), or by double clicking or otherwise opening the file from the Windows Explorer.

# $ K + Glyph Translation Tables and the GTT Editor
A Glyph Translation Table (or GTT file) tells the UniDriver what codes to send to the printer to select a particular Unicode character.  These codes can be from two levels:
1.	The code(s) to select the individual character.  For instance, the code a (hex 61) usually causes the printer to print that very letter, while the code “’\x9.”  (Single quote, backspace, period) may be needed to print an exclamation point.
2.	Optional codes to select and deselect a character set.  The UniDriver design and the GTT editor design assume each character set draws characters from a unique code page.  This is an enhancement over earlier minidrivers, where separate fonts and translation tables were needed for each character set.
Overstriking
The GTT also tells the driver how the codes are to be sent.  In the overstrike case above, the code could have been reduced to “’.”, eliminating the backspace, if an overstrike flag is used.  Each font (UFM) file then tells the driver whether the overstrike is to be done using the backspace, or by explicit X-movement commands.  This flag is found on the UFM editor’s “Selection and Flags ” page.
The overstrike flag for the GTT file is viewable on the Predefined Tables tab.  If it is set, all two-byte codes in the GTT will be rendered this way.
Predefined Tables
GTT files can get quite large, particularly for Far Eastern printers.  To reduce their size, UniDriver supports several predefined GTTs.  These can be viewed on the Predefined Tables tab.  If your printer’s character set is close to that of one of the predefined tables, then you can make the changes using the Code Points tab of the editor.  Only the differences between your GTT and the predefined one will be saved in the file.  These differences can be the addition of new code points, the deletion of existing ones, or the modification of an existing one.
The editor
The editor is a three-tab property sheet:
1.	Code Points and Encodings 
2.	Code Pages Used 
3.	Predefined Tables 
Each tab is discussed on succeeding pages.

# $ K + Viewing and altering code points
The Code Point Encodings tab of the GTT editor displays the encodings and code pages for all of the code points in the GTT.  If the GTT uses a predefined table, the points from that table (those that have not been removed) are also displayed here.  You do not need to worry about which predefined points you have altered- what you see here is what the driver will use.
{bml GTTCPE0.SHG}
Code Point Encodings tab- for further information, click where the cursor changes to a hand above.
{bml gttcpe3.BMP}
On large GTT files, or after adding large numbers of code points, you will need to wait for the tab to be filled.
The following pages describe, in further detail, how to work with this part of the editor.
Keyboard usage
The following keys are used on the code point tab:
Cursor movement keys- these navigate through the list- only one item is selected at a time.  This includes the paging and scrolling keys.
F2- opens an edit control for the current selection string, so you can change it.
F10-displays the editing menu for the current code point.
Delete-deletes the current code point (assuming you verify the deletion).
Letters and numbers-will scroll the list to the next selection string which begins with the letter or number you press.

# $ Character Selection String
This is the code(s) to be sent to the printer to cause the corresponding character to be printed.  These encodings are displayed in C-style syntax.  Non-alphanumeric characters are represented using the \x escape- e.g. \x1B for the ASCII escape character.  Codes are entered in the same fashion.
To sort the list in a collating order (using the ASCII representation of the encoding), click the column header.  To reverse the sort order (ascending to descending or vice-versa), click the header again.

# $ Unicode Code Points
This is the hex representation of the Unicode value for each character.  The MBCS representation (if any) will depend upon the associated code page, and may not be displayable on your system, so it is not used here.
These values cannot be altered- only added or deleted. 
To sort the list in numeric order, click the column header.  To reverse the sort order (ascending to descending or vice-versa), click the header again.

# $ Code page for each code point
Each code point has a code page it is used in.
This value can be changed using the editing menu.  It can only be changed to one of the code pages supported by the GTT.  To add code pages to the GTT for this use, you must use the Code Pages tab. 
To sort the list in numeric order (of the code page number), click the column header.  To reverse the sort order (ascending to descending or vice-versa), click the header again.

# $ K + The code point editing menu
The code point editing menu is displayed by either pressing the F10 key, or by clicking the right mouse button within the list box.  The items available in the menu depend upon how many code pages are available in the GTT, whether the GTT has any defined code points, and where you clicked, if you used the mouse.
{bml gttcpe1.BMP}
The code point editing menu- the selection string for the affected code point is highlighted.
The items on the menu are:
Change Selection String-opens an edit control over the selection string, so you can change it.  This is available when a code point has been selected when the menu is displayed.  You can also do this from the keyboard using the F2 key.
Change Code Page-opens the code page selection dialog listing the other available code pages for this GTT, from which you can select one.  The editor does not check to see if this code point is valid in that page.  This choice is available when a code point is selected for editing, and the GTT supports multiple pages.  There is no keyboard accelerator for this function.
Add-brings up the add code points dialog , if there are unused code points in the current set of supported pages.  This choice is always available.  If the GTT is empty, pressing F10 will immediately invoke this function.
Delete-will delete the selected code point, after a deletion verification query (shown below).  Available when a code point is selected when the menu is displayed.  The Delete key is an accelerator for this function.
{bml gttcpe2.bmp}

# $ K + Add Code Points dialog
This dialog allows you to select one or more code points to add to the GTT file.  Only points currently unused by the GTT file are listed here.
{bml addcdpt.BMP}
Add Code Points dialog- when large numbers of points are available, you must wait for it to be filled.
If a point appears in more than one code page, only one is listed here.  You may change it later using the editing menu.
This is an extended-selection list box- you can select a single range of values by selecting one end point, and holding down the shift key while selecting the other endpoint.  You may add single values or remove them by holding down the Ctrl key while selecting them, and add a range of values by holding down the control key, selecting one end point, then selecting the other while holding down both the control and shift keys.
If you select a very large number of points to add, there will be a delay while the points are added into the table.

# $ K + Sorting the displayed code points
The column headers on the code point tab of the GTT editor allow you to sort the list of points (this is true of all views with sort headers in this product).  The most recently clicked header has the highest sort priority, followed by the next most recently clicked, etc.  You can change the sort order of any column from ascending to descending by clicking the header a second time.
Thus, to view code points (in descending order) within each code page (in ascending order), click the code points header until the list is in descending order, then click the code page header until the code pages are in ascending order.
This feature is also useful in looking for accidentally duplicated selection strings.  Sort on the strings to find any duplicates.

# $ K + Viewing and altering the list of supported code pages
The Code Pages tab of the GTT editor allows you to see and change the list of pages used in the editor, and the command strings sent to the printer to select or deselect the page.
{bml GTTCDPG.SHG}
Code Pages Used tab of the GTT editor.  Click on any control for further information.
The Page name, Select, and Deselect controls reflect the currently selected page in the list.

# $ Code page name
The name of the code page to which the select and deselect entries apply.  To change this, select a different page in the list box.

# $ Code page selection string
The string sent to the printer to cause any further characters printed to be from the selected code page.  This value is displayed and entered using C-style syntax.  Non-alphanumeric values use the \x escape.

# $ Code page deselection string
The string sent to the printer to end the printing of characters from the selected code page.  This value is displayed and entered using C-style syntax.  Non-alphanumeric values use the \x escape.

# $ Supported code page list
This is a list of the code pages currently supported in this GTT file.  The editor does not currently check to see if any of these pages are actually used, but a future version may.

# $ Add Page button
Press this button to display the code page selection dialog .

# $ Remove page button
Press this button to remove the selected page.  The code page selection dialog will be displayed so you can assign a replacement page for any code points that used this page.

# $ K + The Code Page Selection dialog
This dialog is displayed when you need to select a code page from a list of available pages.  The name of the GTT file for which you are making the selection appears in the dialog title.  Only pages suitable to the current operation appear in the list.
{bml cdpgsel.BMP}

# $ K + Predefined tables tab
This tab allows you both to define the usage of any predefined tables in your GTT, and to specify if overstriking is to be used.
{bml gttpre00.BMP}
To enable overstriking of all two-byte codes, check the Overstrike button.
To change the predefined table used, select a different one (or “No predefined table used”) from the list.
Warning: Please be careful when changing this setting.  When a change is made, all unmodified code points are removed from the previous table.  The remaining points are then merged with the new table.  You can lose the definition of some points, or add points you previously removed, by changing this setting.