Graphics State

Contents


Introduction

The graphics state variables establish the context in which TrueType instructions are executed. This chapter provides an alphabetical listing of the variables that make up the graphics state along with a brief description of their purpose and the essential facts needed to understand their role. In particular it provides information on each variable's default value, the instruction used to set its value and a list of instructions affected by its setting. An overall discussion of the role of the graphics state variables can be found in Chapter 2, "Font Engine."

Most of the graphics state variables have a default value as shown below. That value is established the first time a particular font is accessed and again at the start of interpretation of any glyph.

It is possible to change the default values of the graphics state variables using instructions. If the value is changed in the control value program, that value becomes the new default value. If the value of a state variable is changed by instructions associated with a particular glyph, the new value is not a new default value and will hold only for that glyph.

Return to Contents

auto flip

		 Default TRUE

		 Set with		FLIPOFF[]
								 FLIPON[]

		 Affects MIRP[]



Controls whether the sign of control value table entries will be changed to match the sign of the actual distance measurement with which it is compared. Setting auto flip to TRUE makes it possible to control distances measured with or against the projection vector with a single control value table entry. When auto flip is set to FALSE, distances must be measured with the projection vector.

 

Return to Contents

control value cut-in

		 Default 17/16 pixels (F26Dot6)

		 Set with		LCVTCI[]

		 Affects MIAP[]
								 MIRP[]


Limits the regularizing effects of control value table entries to cases where the difference between the table value and the measurement taken from the original outline is sufficiently small.

 


Return to Contents

delta base

		 Default 9

		 Set with		SDB[]

		 Affects DELTAP1[]
								 DELTAP2[]
								 DELTAP3[]
								 DELTAC1[]
								 DELTAC2[]
								 DELTAC3[]


 

Establishes the base value used to calculate the range of point sizes to which a given DELTAC[] or DELTAP[] instruction will apply. The formulas given below are used to calculate the range of the various DELTA instructions.

 

	 DELTAC1		 DELTAP1		 (delta_base) through (delta_base + 15)
	 DELTAC2		 DELTAP2		 (delta_base + 16) through (delta_base + 31)
	 DELTAC3		 DELTAP3		 (delta_base + 32) through (delta_base + 47)



Return to Contents

delta shift

		 Default 3

		 Set with		SDS[]

		 Affects DELTAP1[]
								 DELTAP2[]
								 DELTAP3[]
								 DELTAC1[]
								 DELTAC2[]
								 DELTAC3[]


 

Determines the range of movement and smallest magnitude of movement (the step) in a DELTAC[] or DELTAP[] instruction. Changing the value of the delta shift makes it possible to trade off fine control of point movement for range of movement. A low delta shift favors range of movement over fine control. A high delta shift favors fine control over range of movement. The step has the value 1/2 to the power delta shift. The range of movement is calculated by taking the number of steps allowed (16) and multiplying it by the step.

The legal range for delta shift is zero through six. Negative values are illegal.


Return to Contents

dual projection vector

		 Default none

		 Set with		SDPVTL[]

		 Affects IP[]
								 GC[]
								 MD[]
								 MDRP[]
								 MIRP[]



A second projection vector set to a line defined by the original outline location of two points. The dual projection vector is used when it is necessary to measure distances from the scaled outline before any instructions were executed.


Return to Contents

freedom vector

		 Default x-axis

		 Set with		SFVTCA[]
								 SFVTL[]
								 SFTPV[]
								 SVTCA[]
								 SFVFS[]
		 Affects ALIGNPTS[]
								 ALIGNRP[]
								 DELTAP1[]
								 DELTAP2[]
								 DELTAP3[]
								 IP[]
								 MDAP[]
								 MDRP[]
								 MIAP[]
								 MIRP[]
								 MSIRP[]
								 ROUND[]
								 SCFS[]
								 SHC[]
								 SHPIX[]
								 SHZ[]
								 UTP[]


 

A unit vector that establishes an axis along which points can move.


Return to Contents

instruct control

		 Default		 0

		 Set with				INSTCTRL[]

		 Affects all	 instructions


 

Makes it possible to turn off instructions under some circumstances. When set to TRUE, no instructions will be executed.


Return to Contents

loop

		 Default 1

		 Set with		SLOOP[]

		 Affects ALIGNRP[]
								 FLIPPT[]
								 IP[]
								 SHP[]
								 SHPIX[]


 

Makes it possible to repeat certain instructions a designated number of times. The default value of one assures that unless the value of loop is altered, these instructions will execute one time.

 

Return to Contents

minimum distance

		 Default 1 pixel (F26Dot6)

		 Set with		SMD[]

		 Affects MDRP[]
								 MIRP[]


 

Establishes the smallest possible value to which a distance will be rounded.


Return to Contents

projection vector

		 Default x-axis

		 Set with		SPVTCA[]

								 SPVTL[]
								 SVTCA[]
								 SPVFS[]

		 Affects ALIGNPTS[]
								 ALIGNRP[]
								 DELTAP1[]
								 DELTAP2[]
								 DELTAP3[]
								 GC[]
								 IP[]
								 MD[]
								 MDAP[]
								 MDRP[]
								 MIAP[]
								 MIRP[]
								 MSIRP[]
								 SCFS[]
								 SHC[]
								 SHP[]
								 SHZ[]


 

A unit vector whose direction establishes an axis along which distances are measured.


Return to Contents

round state

		 Default 1 (grid)
		 Set with		RDTG[]
								 ROFF[]
								 RTDG[]
								 RTG[]
								 RTHG[]
								 RUTG[]
								 SROUND[]
								 S45ROUND[]

		 Affects EVEN[]
								 ODD[]
								 MDAP[]
								 MIAP[]
								 MDRP[]
								 MIRP[]
								 ROUND[]


Determines the manner in which values are rounded. Can be set to a number of predefined states or to a customized state with the SROUND or S45ROUND instructions.


Return to Contents

rp0

		 Default 0
		 Set with		SRP0[], MDRP[], MIAP[], MSIRP[]

		 Affects ALIGNRP[]
								 MDRP[]
								 MIRP[]
								 MSIRP[]


 

The first of three reference points. References a point number that together with a zone designation specifies a point in either the glyph zone or the twilight zone.


Return to Contents

rp1

		 Default 0

		 Set with		SRP1[], MDAP[], MDRP[], MIRP[]
		 Affects IP[]
								 SHC[]
								 SHP[]
								 SHZ[]


 

The second of three reference points. References a point number that together with a zone designation specifies a point in either the glyph zone or the twilight zone.


Return to Contents

rp2

		 Default				 0
		 Set with		SRP2[], MDRP[], MIRP[]
		 Affects IP[]
								 SHC[]
								 SHP[]
								 SHZ[]



The third of three reference points. References a point number that together with a zone designation specifies a point in to either the glyph zone or the twilight zone.


Return to Contents

scan control

		 Default FALSE
		 Set with		SCANCTRL[]



Determines whether the interpreter will activate dropout control for the current glyph. Use of the dropout control mode can depend upon the currently prevailing combination of the following three conditions:

 

  1. Is the glyph rotated?
  2. Is the glyph stretched?
  3. Is the current pixel per em setting less than a specified threshold?

It is also possible to block dropout control if one of the above conditions is false.


Return to Contents

single_width_cut_in

		 Default 0 pixels (F26Dot6)
		 Set with		SSWCI[]
		 Affects MDRP[]
								 MIRP[]



The distance difference below which the interpreter will replace a CVT distance or an actual distance in favor of the single width value.


Return to Contents

single_width_value

		 Default 0 pixels (F26Dot6)
		 Set with		SSW[]

		 Affects MDRP[]
								 MIRP[]



The value used in place of the control value table distance or the actual distance value when the difference between that distance and the single width value is less than the single width cut-in.


Return to Contents

zp0

		 Default 1
		 Set with		SZP0[]
								 SZPS[]
		 Affects ALIGNPTS[]
								 ALIGNRP[]
								 DELTAP1[]
								 DELTAP2[]
								 DELTAP3[]
								 FLIPPT[]
								 FLIPRGOFF[]
								 FLIPRGON[]
								 IP[]
								 ISECT[]
								 MD[]
								 MDAP[]
								 MDRP[]
								 MIAP[]
								 MIRP[]
								 MSIRP
								 SHC[]
								 SHP[]
								 UTP[]


 

The first of three zone pointers. Can be set to reference either the glyph zone (Z0) or the twilight zone (Z1).



Return to Contents

zp1

		 Default 1
		 Set with		SZP1[]
								 SZPS[]

		 Affects ALIGNPTS[]
								 ALIGNRP[]
								 IP[]
								 ISECT[]
								 MD[]
								 MDRP[]
								 MIRP[]
								 MSIRP[]
								 SDPVTL[]
								 SFVTL[]
								 SHC[]
								 SHP[]
								 SHZ[]
								 SPVTL[]



The second of three zone pointers. Can be set to reference either the twilight zone (Z0) or the glyph zone (Z1).


Return to Contents

zp2

		 Default 1
		 Set with		SZP2[]
								 SZPS[]

		 Affects GC[]
								 IP[]
								 ISECT[]
								 IUP[]
								 SCFS[]
								 SDPVTL[]
								 SFVTL[]
								 SHC[]
								 SHP[]
								 SHPIX[]
								 SPVTL[]



The third of three zone pointers. Can be set to reference either the twilight zone (Z0) or the glyph zone (Z1).