Compensating for the engine characteristics

The following two functions make it possible to compensate for the engine characteristic. Each takes value and make the compensation. In addition to the engine compensation, ROUND, rounds the value according to the round_state. NROUND only compensates for the engine.

ROUND value

ROUND[ab]

Flags

ab: distance type for engine characteristic compensation

Pops

n1

Pushes

n2

Code

0x68 - 0x6B


Rounds a value according to the state variable round_state while compensating for the engine. n1 is popped off the stack and, depending on the engine characteristics, is increased or decreased by a set amount. The number obtained is then rounded and pushed back onto the stack as n2.

The value ab specifies the distance type as described in the chapter, "Instructing Glyphs." Three values are possible: Gray=0, Black=1, White=2.

No ROUNDing of value

NROUND[ab]

Flags

ab: distance type for engine characteristic compensation

Pops

n1

Pushes

n2

Code

0x6C - 0x6F


NROUND[ab] does the same operation as ROUND[ab] (above), except that it does not round the result obtained after compensating for the engine characteristics. n1 is popped off the stack and, depending on the engine characteristics, increases or decreases by a set amount. This figure is then pushed back onto the stack as n2.

The value ab specifies the distance type as described in the chapter, "Instructing Glyphs." Three values are possible: Gray=0, Black=1, White=2.