Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 30 of 33

IPL Programming Reference Manual: Appendix C: Creating User-Defined Bitmap Fonts and Graphics

Pages 255 to 268 of 298, from IPL Programming Reference Manual

The original document is the PDF (1.4 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Intermec 3600 and Intermec 4400

Page 255

C Creating User-Defined Bitmap Fonts and Graphics

Page 256

fds

Page 257

Creating User-Defined Bitmap Fonts and Graphics

C

This appendix explains how to create user-defined bitmap fonts and graphics.

Creating User-Defined Bitmap Graphics You can create user-defined graphics (user-defined characters, or UDCs) in two ways: one bit per byte or six bits per byte. To use the UDC in a format, you must first define a graphic field using the IPL command Un[,name]. For help using the Un[,name] (UserDefined Character Field, Create or Edit) command, see Chapter 7, “IPL Command Reference.”

Creating One Bit Per Byte User-Defined Graphics One bit per byte is the standard graphic format used for downloading to an Intermec 8636/8646 printer. You can download a one bit per byte graphic to the printer when it is in 86XX Emulation mode. A one bit per byte bitmap image is an arrangement of ones and zeros that looks similar to the following example. Bitmap Pattern

Row

000000010000000

Row 0

000000111000000

Row 1

000001011100000

Row 2

000010011110000

Row 3

000100011111000

Row 4

001000011111100

Row 5

010000011111110

Row 6

100000011111111

Row 7

010000010000010

Row 8

001000010000100

Row 9

000100010001000

Row 10

000010010010000

Row 11

000001010100000

Row 12

000000111000000

Row 13

000000010000000

Row 14

If you look closely at the bitmap pattern above, you can see that it is the outline of a diamond with a line down the middle and the upper right corner blacked in.

C-3

Page 258

IPL Programming Reference Manual

To create your own graphic 1. Draw your design on a piece of graph paper:

IPL.027

2. Convert each of the squares to either a one or a zero (the zeros are blanks and the ones are dots), and type it into a text file column by column. When you send the file to the printer, a character in the file represents either a dot or a blank when the image prints. UØ

➤ U14 ooooooo I ooooooo oooooo I I I oooooo ooooo I o I I I ooooo oooo I oo I I I I oooo ooo I ooo I I I I I ooo oo I oooo I I I I I I oo o I ooooo I I I I I I I o I oooooo I I I I I I I I o I ooooo I ooooo I o oo I oooo I oooo I oo ooo I ooo I ooo I ooo oooo I oo I oo I oooo ooooo I o I o I ooooo oooooo I I I oooooo ooooooo I ooooooo IPL.028

C-4

Page 259

Creating User-Defined Bitmap Fonts and Graphics

C

3. Read the pattern of ones and zeros down each column starting at the top left corner. The first column on the left becomes the data for the u0 command line, the second column becomes the data for the u1 command line, and so on. Type this into a text file:

U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, ooooooo I ooooooo oooooo I I I oooooo ooooo I o I I I ooooo oooo I oo I I I I oooo ooo I ooo I I I I I ooo oo I oooo I I I I I I oo o I ooooo I I I I I I I o I oooooo I I I I I I I I o I ooooo I ooooo I o oo I oooo I oooo I oo ooo I ooo I ooo I ooo oooo I oo I oo I oooo ooooo I o I o I ooooo oooooo I I I oooooo ooooooo I ooooooo

UØ,

IPL.029

C-5

Page 260

IPL Programming Reference Manual

4. Ensure that the printer is in 86XX Emulation mode, and then add the protocol characters and define the bitmap as a user-defined graphic. The following example gives the graphic the number 3, the name “diamond,” the dimensions 15 rows by 15 columns, and adds the ASCII characters necessary for the printer to understand the graphic.

C-6

Command Line

Description

<STX><ESC>c<ETX>

Selects 86XX mode

<STX><ESC>P<ETX>

Enter Program mode

<STX>G3,diamond;x15;y15;<ETX>

Create UDC bitmap 3 (diamond)

<STX>u0,000000010000000;<ETX>

Define column 0

<STX>u1,000000101000000;<ETX>

Define column 1

<STX>u2,000001000100000;<ETX>

Define column 2

<STX>u3,000010000010000;<ETX>

Define column 3

<STX>u4,000100000001000;<ETX>

Define column 4

<STX>u5,001000000000100;<ETX>

Define column 5

<STX>u6,010000000000010;<ETX>

Define column 6

<STX>u7,111111111111111;<ETX>

Define column 7

<STX>u8,011111110000010;<ETX>

Define column 8

<STX>u9,001111110000100;<ETX>

Define column 9

<STX>u10,000111110001000;<ETX>

Define column 10

<STX>u11,000011110010000;<ETX>

Define column 11

<STX>u12,000001110100000;<ETX>

Define column 12

<STX>u13,000000111000000;<ETX>

Define column 13

<STX>u14,000000010000000;<ETX>

Define column 14

<STX>R;<ETX>

Save and exit to Print mode

Page 261

Creating User-Defined Bitmap Fonts and Graphics

C

Creating Six Bits Per Byte User-Defined Graphics The six bits per byte format is more compact than one bit per byte. When you use six bits per byte, you can download large graphics more quickly. The printer must be in Advanced mode (2.5 mil or 5.0 mil) to use the six bits per byte format. The only difference between 2.5 mil and 5.0 mil mode is the size of the image when it prints. The arrangement of the bits is very important in this format. Eight bits (0 through 7) compose every byte, but the printer only uses bits 0 through 5 to map the image. You must always set bit 6 (the seventh bit) to 1 so you can download data to the printer. 7-bit hosts reserve bit 7 (the eighth bit) for parity and compatibility, so the range of characters for any given UDC is 40 hex (@) to 127 hex („ delete character). You can download graphics like the previous one bit per byte (diamond) bitmap example in a six bits per byte format by following the procedure below. Please refer to “Creating Six Bits Per Byte User-Defined Fonts” later in this appendix for an illustrated example of creating a six bits per byte format. To download a six bits per byte graphic 1. Draw the graphic on graph paper. 2. Change the graph paper drawing into a pattern of ones (square is filled in) and zeros (square is empty). 3. Starting from the top row, divide each vertical column into groups of six digits. (If the bottom group has less than six digits, add zeros to this group until it also has six.) The six digits in each group are the six bits that you download in a byte of data. The top digit of each group is bit 0, the bottom digit is bit 5. 4. Add a 1 in the bit 6 position, and then add a 0 in the bit 7 position so that each group now has eight digits. (Eight digits complete the byte.) 5. Starting with the first group of 8 bits in the first column, reverse the order of each group so that bit 0 is now last and bit 7 is first. Work from the top of each column to the bottom. Each eight-digit group is now a binary representation of an ASCII character. 6. Translate each eight-digit group into an ASCII character according to the full ASCII table in Appendix A.

C-7

Page 262

IPL Programming Reference Manual

7. Make sure the printer is in Advanced mode and not in 86XX Emulation mode. For help, see the 86XX or Advanced Mode on Power-up command in Chapter 7, “IPL Command Reference.” 8. Download the graphic so that each column is represented by a command string. Here is the same format for the diamond shape graphic shown earlier, but this time it is in six bits per byte format with ASCII characters. Command

Definition

<STX><ESC>C<ETX>

Selects Advanced mode

<STX><ESC>P<ETX>

Enter Program mode

<STX>G2,diamond;x15;y15;<ETX>

Create UDC bitmap 2 (diamond), 15 rows by 15 columns

<STX>u0,@B@;<ETX>

Define column 0

<STX>u1,@E@;<ETX>

Define column 1

<STX>u2,`H@;<ETX>

Define column 2

<STX>u3,PP@;<ETX>

Define column 3

<STX>u4,H`@;<ETX>

Define column 4

<STX>u5,D@A;<ETX>

Define column 5

<STX>u6,B@B;<ETX>

Define column 6

<STX>u7,<DEL><DEL>G;<ETX>

Define column 7

<STX>u8,~CB;<ETX>

Define column 8

<STX>u9,|CA;<ETX>

Define column 9

<STX>u10,xc@;<ETX>

Define column 10

<STX>u11,pS@;<ETX>

Define column 11

<STX>u12,`K@;<ETX>

Define column 12

<STX>u13,@G@;<ETX>

Define column 13

<STX>u14,@B@;<ETX>

Define column 14

<STX>R;<ETX>

Save and exit to Print mode

C-8

Page 263

Creating User-Defined Bitmap Fonts and Graphics

C

After downloading the graphic to the printer, download the following format to see how the graphic prints. A label similar to the one following the format prints: Command

Definition

<STX><ESC>C<ETX>

Selects Advanced mode

<STX><ESC>P<ETX>

Enter Program mode

<STX>E4;F4<STX>

Create format 4

<STX>U1;o1050,650;c2;w20;h20;<ETX>

Create graphic field 1, origin of 1050,650, use graphic 2, and magnify it by a factor of 20

<STX>R;<ETX>

Save and exit to Print mode

<STX><ESC>E4<ETX>

Select format 4

<STX><ETB><ETX>

Print

IPL.030

C-9

Page 264

IPL Programming Reference Manual

Creating User-Defined Bitmap Fonts There are two ways to create user-defined fonts: one bit per byte format (86XX Emulation mode) or six bits per byte format (Advanced mode).

Creating One Bit Per Byte User-Defined Fonts In 86XX Emulation mode, the printer receives downloaded fonts in the same manner as the 8636/8646 printers. You create characters column by column, from the top of the column downward. In 86XX Emulation mode, each byte of data represents one bit in the bitmap. The following example lists the commands and data required to define a font with the two characters “$” (t36) and “i” (t105). See “Creating One Bit Per Byte User-Defined Graphics” earlier in this appendix for more information. Commands

Definition

<STX><ESC>c<ETX>

Selects 86XX Emulation mode

<STX><ESC>P<ETX>

Enter Program mode

<STX>T11,FONT11<ETX>

Create bitmap font 11

<STX>x10;y14;<ETX>

Define cell width and height

<STX>t36;Z12;<ETX>

Create character 36 ($), character width is 12

<STX>u0,00111110001100;<ETX>

Define column 0

<STX>u1,01111111001110;<ETX>

Define column 1

<STX>u2,01100011000110;<ETX>

Define column 2

<STX>u3,01100011000110;<ETX>

Define column 3

<STX>u4,11111111111111;<ETX>

Define column 4

<STX>u5,11111111111111;<ETX>

Define column 5

<STX>u6,01100011000110;<ETX>

Define column 6

<STX>u7,01100011000110;<ETX>

Define column 7

<STX>u8,01110011111110;<ETX>

Define column 8

<STX>u9,00110001111100;<ETX>

Define column 9

<STX>t105;Z4;<ETX>

Create character 105 (i), character width is 4

<STX>u4,00110011111111;<ETX>

Define column 4

<STX>u5,00110011111111;<ETX>

Define column 5

<STX>R;<ETX>

Save and exit to Print mode

C-10

Page 265

Creating User-Defined Bitmap Fonts and Graphics

C

Creating Six Bits Per Byte User-Defined Fonts You can also create bitmaps in Advanced mode. In Advanced mode, each data byte represents six bits in the bitmap. See the following example to create a six bits per byte format like the previous one bit per byte (“$” and “i”) bitmap font examples. To download a six bits per byte format 1. Draw the character on graph paper. 2. Change the graph paper drawing into a pattern of ones and zeros.

6 digits u0 o o o o I o I I I I

I

I

I I

I o o I I o o I I o o I

I

I

I

I

I

I

2 digits (add zeros)

I

I

I

I

I

I

I o o I I I o o o o I o o o o I I I I o o I I I o o o o o o o o I I o o I I o o o I I I o o o o

I

I

I

I

I

6 digits

I u9 o o o o I I I I o

I

I

I

I

I o o I I o o I I o o I

I

I

I

I

I

I

I

I

I

I I I I I o I o o o o I

I

I

IPL.031

C-11

Page 266

IPL Programming Reference Manual

3. Starting with the first column, divide each vertical column into groups of six digits. (If the bottom group has less than six digits, add zeros to this group until it also has six.) The six digits in each group are the six bits that you download in a byte of data. The top digit of each group is bit 0, and the bottom digit is bit 5.

bit Ø bit 5 bit 6 bit 7 bit Ø bit 5 bit 6 bit 7 bit Ø bit 5 bit 6 bit 7 u0 u1 u2 u3 u4 u5 u6 u7 u8 u9 o o o o I I o o o o o I I I I I I I I o I I I I I

I I I I I o o o I o o o

I

I I

I I o o o o o

I I I

I I I o o o o o o o o

I

I I I I I o o o

I

I I I I I

I

I

I

I o o o o o o

I I

I I I I I I I

I I o o o

I I o o o

I I

I I

I I I I I I I o o o o o

I o o o o o o o o o

I I

I I

I I I I I I I o o o o

I I

I I o o o o o o o o

I

I

I o o o o o o o o o o o o o o o

I

I o o o

I I o o

I

I

I o o o o o o o o o o o o o o o

I I o o

I I I I I I o o o o o o o

I

I

I

I

I

I

I

I

I

I o o o o o o o o o o

IPL.032

4. Add a 1 in the bit 6 position, and then add a 0 in the bit 7 position so that each group now has eight digits. Eight digits complete the byte. 5. Starting with the first group of eight bits in the first column (u0), reverse the order of each group so that bit 0 is now last and bit 7 is first. Work from the top of each column to the bottom. Each eight-digit group is now a binary representation of an ASCII character.

C-12

Page 267

Creating User-Defined Bitmap Fonts and Graphics

C

Note: In this illustration, each row now represents a column.

bit Ø o I I I ooo I o I I I oo I I o I I ooo I I o I I ooo I I oI I I I I I I oI I I I I I I o I I ooo I I o I I ooo I I oI I I I I I I oI I I I I Io bit 7 bit Ø o I I I I I oo oI I I I I Io o I ooo I I o o I ooo I I o oI I I I I I I oI I I I I I I o I ooo I I o o I ooo I I o o I oo I I I o o I oo I I oo bit 7 bit Ø bit 7 uØ u1 u2 u3 u4 u5 u6 u7 u8 u9 o I oooooo o I ooooo I o I ooooo I o I ooooo I o I oooo I I o I oooo I I o I ooooo I o I ooooo I o I ooooo I o I oooooo IPL.033

6. Translate each eight-digit group into an ASCII character according to the full ASCII table in Appendix A. u0 = |q@ u1 = ~sA u2 = FcA u3 = FcA u4 = <DEL><DEL>C u5 = <DEL><DEL>C u6 = FcA u7 = FcA u8 = N<DEL>A u9 = L~@ 7. Make sure the printer is in Advanced mode and not in 86XX Emulation mode. 8. Download the font so that you represent each column with a command string.

C-13

Page 268

IPL Programming Reference Manual

Here are the previously defined characters shown in a six bits per byte format with ASCII characters. Commands

Definitions

<STX><ESC>C<ETX>

Selects Advanced mode

<ESC>P;<ETX>

Enters Program mode

<STX>T11,FONT11<ETX>

Create bitmap font 11

<STX>x10;y14;<ETX>

Define cell width (10) and cell height (14)

<STX>t36;Z12;<ETX>

Create ASCII character 36 ($), define character width as 12

<STX>u0,|q@;<ETX>

Defines column 0

<STX>u1,~sA;<ETX>

Defines column 1

<STX>u2,FcA;<ETX>

Defines column 2

<STX>u3,FcA;<ETX>

Defines column 3

<STX>u4,<DEL><DEL>C;<ETX>

Defines column 4

<STX>u5,<DEL><DEL>C;<ETX>

Defines column 5

<STX>u6,FcA;<ETX>

Defines column 6

<STX>u7,FcA;<ETX>

Defines column 7

<STX>u8,N<DEL>A;<ETX>

Defines column 8

<STX>u9,L~@;<ETX>

Defines column 9

<STX>t105;Z4;<ETX>

Creates ASCII character 105 (i), define character width as 4

<STX>u0,L<DEL>C;<ETX>

Defines column 0

<STX>u1,L<DEL>C;<ETX>

Defines column 1

<STX>R;<ETX>

Saves and exits to Print mode

C-14