You are on page 1of 5

WinLase Professional

LaserFont File Specification

20.006 6/8/12
Rev 2.1
Font File Specification

Lanmark Controls Inc. has prepared this document for use by its personnel, licensees, and potential licensees.
Lanmark Controls Inc. reserves the right to change any products described in this document as well as
information included herein without prior notice. Although the information presented in this document has
been tested and reviewed, this document does not convey any license or warranty beyond the terms and
conditions set forth in the written contracts and license agreements between Lanmark Controls Inc. and its
customers.

The software described in this document is licensed from and is a trade secret of Lanmark Controls Inc. Refer
to your License Agreement for restrictions on use, duplication, or disclosure. Government users and prime
contractors are also governed by the restricted rights legend:
----

RESTRICTED RIGHTS LEGEND. Use, duplication, or disclosure by the U.S. Government is subject to the
Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 © (1) (ii) (Oct. 1988) and
FAR 52.227-19 © (June 1987) or other agency provision is as applicable. Copyright Lanmark Controls Inc.

Unpublished – All rights reserved under the copyright laws of the United States.
----

Brands mentioned are trademarks or registered trademarks of their respective holders.


----

Lanmark Controls Inc. Page 2 of 5


Font File Specification

Table of Contents
1. Introduction .............................................................................................................................. 4
2. Font File Format ....................................................................................................................... 4
2.1 Font File Header Format .................................................................................................. 4
2.2 Font File Data Format ...................................................................................................... 4
2.3 Vector List Format ........................................................................................................... 5

Lanmark Controls Inc. Page 3 of 5


Font File Specification

1. Introduction
This manual details the font format specification for vector fonts used with WinLase Editor. These vector fonts
are designed specifically for laser marking, and are commonly referred to as laser fonts.

2. Font File Format


The font file is a binary file containing the vector list associated with a particular font. A font file (*.wlf)
consists of two sections:

• The header
• The font data (vector list)

2.1 Font File Header Format


In the following description, an unsigned short is 2 bytes, and an unsigned int is 4 bytes.

• Magic Number – (unsigned int) This field must contain the decimal value 469800. WinLase will not
recognize the file as a valid *.wlf file without this value.
• Number of Entries – (unsigned short) This field contains the number of character entries in the font file,
typically set to 256. This defines the size of the table starting at ASCII 0 through to, for example, ASCII
255.
• Undefined – (unsigned short) This field is currently unused.
• Jump Table Offset – (unsigned int) This field contains the byte offset from the beginning of the file to
the beginning of the jump table. This allows the font header to change in size without affecting software
that uses this field to locate the font jump table.
• Character Height – (unsigned short) Specifies the font height for all characters in the font. It is
interpreted as the line feed added by WinLase between lines of text. Typically set to 640.
• Font Description – This is an 88-character ASCII string that contains a description of the font.
• Jump Table – The jump table contains the offset and the size of each character in the font. The offset is
from the beginning of the font file. The size is given in bytes. It is possible for a character to be zero bytes
in length, and it is also possible for two different characters to have the same offset (i.e. they share a set of
vectors). Each jump table entry is 8 bytes long. The first four bytes are an unsigned int indicating the
offset to the start of the vector list for the character and the second four bytes are an unsigned int
specifying the number of bytes required to describe the vectors for that character. Note: The only
exception to the above description is that the first offset entry in the jump table is always zero. This offset
is not needed since the first vector always begins immediately after the end of the Jump Table.

2.2 Font File Data Format


The data for each character consist of a vector list, which is a list of commands describing how to draw the
character. These start with a relative jump followed by relative moves and jumps and normally ending in a
relative jump. No end of list indicator is required, because the length is defined in the Jump Table.

Lanmark Controls Inc. Page 4 of 5


Font File Specification

2.3 Vector List Format


The vector list embedded in a font file (*.wlf) contains a command set for specifying vectors and associated
data. Each vector instruction is five bytes long. The first byte is a command. The next two words (2 bytes to a
word) are data that is defined by the context of the associated command. The following table describes the
vector list format:

VECTOR COMMAND VECTOR INSTRUCTION

COMMAND DESCRIPTION RANGE Cmd X-Position Y-Position


Byte LSB MSB LSB MSB

JR Jump Relative -32768 to 32767 0x0002 nn nn nn nn


MR Mark Relative -32768 to 32767 0x0004 nn nn nn nn

n represents a Hex number

Lanmark Controls Inc. Page 5 of 5

You might also like