|   File        : FontUtilEg
|   Date        : 10-Sep-97
|   Author      :  A.Thoukydides, 1997
|   Description : An example of how FontUtils can be used.
|                 This combines the 8x8 pixel ctrl character symbols with the
|                 10x20 pixel X font, and adds italic and underline effects.
|                 The result is finally converted back to a Zap font.

| Convert the standard 8x8 hexadecimal control characters to sprites
Echo 2 { > pipe:$.input }
Run <ZaptoSpr$Dir>.CnvrtFonts ZapFontsSource:08x08.SysHex ZapFontsSource:EgCtrl { < pipe:$.input }
Delete pipe:$.input

| Convert the 10x20 X font characters to sprites
Echo 1 { > pipe:$.input }
Run <ZaptoSpr$Dir>.CnvrtFonts ZapFontsSource:10x20.X ZapFontsSource:EgMain { < pipe:$.input }
Delete pipe:$.input

| Extract the control characters and scale to 10x20 pixels
|   -width 10 -height 20    Force the size of the converted characters
|   -xoffset 2 -yoffset 4   Position the symbols within the new size
|   -90x90dpi               Force the converted characters to 1dpp
|   -first 0 -last 31       Only extract the control character symbols
Run <FontUtils$Dir>.Library.FontUtils -width 10 -height 20 -xoffset 2 -yoffset 4 -90x90dpi -first 0 -last 31 ZapFontsSource:EgCtrl ZapFontsSource:EgCtrl

| Italicise the non-control character symbols
|   -italic                 Apply an italic effect to processed characters
|   -stylesize 5            The characters should be shifted in 5 sections
|   -first 32 -last 255     Only process the non-control characters
Run <FontUtils$Dir>.Library.FontUtils -italic -stylesize 5 -first 32 -last 255 ZapFontsSource:EgMain ZapFontsSource:EgMain

| Combine with the control character symbols and add an underline effect
|   -underline              Apply an underline effect to processed characters
|   -stylesize 2            Make the underlining 2 pixels high
|   -stylepos 2             Leave a gap of 2 pixels below the underlining
|   -first 32 -last 255     Only process the non-control characters
|   -base <file>            Add to the existing control character symbols
Run <FontUtils$Dir>.Library.FontUtils -underline -stylesize 2 -stylepos 2 -first 32 -last 255 -base ZapFontsSource:EgCtrl ZapFontsSource:EgMain ZapFontsSource:EgMain

| Convert the result back to a Zap font
Run <ZaptoSpr$Dir>.CnvrtFonts ZapFontsSource:EgMain ZapFontsSource:10x20.XEgHex

| Delete the intermediate files
Delete ZapFontsSource:EgCtrl
Delete ZapFontsSource:EgMain
