Programming guide friendly ghost language


SHADING PATTERN SUPPLEMENT



Download 1.07 Mb.
Page17/27
Date29.01.2017
Size1.07 Mb.
#11977
1   ...   13   14   15   16   17   18   19   20   ...   27

SHADING PATTERN SUPPLEMENT


(Not available on 22/24/26)

The ability to shade the ticket with different patterns is available on the 44 and 46 printer. There are around twenty patterns presently stored in the printer. More patterns will probably be added in the future. Also, we intend to allow the customer to download their own patterns. The following commands and examples demonstrate the SHADING function of the printer.


SHADE PATTERN IN BACKGROUND -

The shading can be either in the foreground or the background. This command causes the shading to occur in the background. This is the default setting for the printer.

SHADE PATTERN IN FOREGROUND -

The shading can be either in the foreground or the background. This command causes the shading to occur in the foreground.
SHADE PATTERN # -

The number sent is the pattern that you want to shade with. See the chart below for the preliminary list of patterns available. This may change slightly in the future. Pattern 14 is the default setting
Pattern #
0 - white 10 - white 20 - vertical lines

1 - very light course dot pattern 11 - very light fine dot pattern 21 - horizontal lines

2 - light course dot pattern 12 - light fine dot pattern 22 - forward diagonal lines

3 - light - medium course dot pattern 13 - light - medium fine dot pattern 23 - backward diagonal lines

4 - medium course dot pattern 14 - medium fine dot pattern 24 - square grid

5 - dark - medium course dot pattern 15 - dark - medium fine dot pattern 25 - diagonal grid

6 - dark course dot pattern 16 - dark fine dot pattern

7 - open 17 - open

8 - open 18 - open

9 - black 19 - black



ENABLE SHADING -
This starts the shading of all the following data until the disable shading command.

DISABLE SHADING -
This ends the shading of the data.

Note: When background shading text, the entire character boxsize is shaded. You can adjust this by using the boxsize command. Also, due to the special dot history algorithms used by the printer to control print intensity some patterns will print slightly lighter or darker depending on their rotations.

Sample foreground shading ticket produced by the following commands.


SHADING TEST


SHADING TEST


SHADING TEST

Sample background shading ticket produced by the following commands.




SHADING TEST


SHADING TEST


SHADING TEST


SHADING TEST

You can shade an entire ticket by using the starting and ending row, column commands along with the shading command.









JUSTIFY TEXT SUPPLEMENT


(New feature for 26/46 only)
FGL Center Justify Text Command -
The FGL center justify command is based on the concept of a text field. The text field has a starting position and length as well as other FGL attributes that define the text formatting. The field length is provided as a parameter to the centering command () and specifies the field length in dots. The remaining attributes are provided by the current state of the FGL command interpreter including, starting position, font selection and scale factors (height, width and scale down). The text string should immediately follow the centering command and is identified by a start and stop delimiter the tilde character ( “~”, ASCII value 0x7E ). The text string should only include printable characters; control characters and FGL commands are not permitted.

 

If the length of the text string exceeds the length of the text field the text string will be left justified and the string will be allowed to extend beyond the end of the field. In addition, if the length of the text field added to the starting position exceeds the length or width of the ticket the field length will be truncated to fit within the ticket boundaries. This can be used to your advantage when centering text in the middle of a ticket by moving the cursor to the edge of the ticket and defining a field obviously longer (or wider) than the ticket (). Since the field length is clipped to the ticket length the text field covers the entire length of the ticket and the text string is centered on the ticket. The centering command works for resident fonts, downloaded soft fonts and TrueType outline fonts.



 

Example: “~Centered Text~

 

The example code places the starting position of the text field at 100 dots from the left edge and 100 dots down from the top edge of the ticket (FGL non-rotated orientation). The text string will use Font 13 with the height and width scaled by a factor of 2. The text field is define as 1000 dots long and will have the text string “Centered Text” centered within the field.



 

FGL Right Justify Text Command -
The FGL command is ~Printable Text~ where the pound represents the field width in Dots per Inch.  The ~ is the delimiter used to mark the beginning and ending of the text to be justified.  The test below was performed on a 300 DPI printer, so the use of 300 in the represents a one inch field.  The text “Testing” is right justified in a one inch field just past the capital “X”.

 

Interpretation of example command is:


Starting at Row 100 & Column 100, print a capital X using Font 3.  Then print the word “Testing”, right justified in a 300 dot (one inch) field.  Finally a form feed command
is sent to eject the ticket from the printer.

 

Example command sent to printer:



 

X~Testing~





Download 1.07 Mb.

Share with your friends:
1   ...   13   14   15   16   17   18   19   20   ...   27




The database is protected by copyright ©ininet.org 2024
send message

    Main page