| 1 |
/* gstate.h -- define data structures for Graphics State, graphics states are |
| 2 |
* mananged by font instructions. |
| 3 |
* Copyright (C) 1996 Li-Da Lho, All right reserved. |
| 4 |
*/ |
| 5 |
|
| 6 |
#ifndef __TTF_GSTATE_H |
| 7 |
#define __TTF_GSTATE_H |
| 8 |
|
| 9 |
/* $Id: gstate.h,v 1.2 1998/07/06 06:07:01 werner Exp $ */ |
| 10 |
|
| 11 |
/* unit vectors used for directional purposes */ |
| 12 |
#define F2Dot14_ONE 1<<14 |
| 13 |
#define F2Dot14_EPSILON 1 |
| 14 |
|
| 15 |
#define F26Dot6_ONE 1L<<26 |
| 16 |
#define F26Dot6_EPSILON 1L |
| 17 |
|
| 18 |
typedef struct |
| 19 |
{ |
| 20 |
F2Dot14 x; |
| 21 |
F2Dot14 y; |
| 22 |
} |
| 23 |
TTFUnitVector; |
| 24 |
|
| 25 |
/* Unit vectors pointing into x and y direction */ |
| 26 |
#define UnitX {F2Dot14_ONE,0} |
| 27 |
#define UnitY {0,F2Dot14_ONE} |
| 28 |
|
| 29 |
/* vectors used as positional vectors */ |
| 30 |
typedef struct |
| 31 |
{ |
| 32 |
F26Dot6 x; |
| 33 |
F26Dot6 y; |
| 34 |
} |
| 35 |
TTFVector; |
| 36 |
|
| 37 |
/* the types of the following fields are not well defined in the True Type |
| 38 |
* Font specification. |
| 39 |
* We can define them as we like. |
| 40 |
*/ |
| 41 |
typedef struct |
| 42 |
{ |
| 43 |
/* boolean values */ |
| 44 |
BYTE auto_flip; |
| 45 |
|
| 46 |
BYTE scan_control; |
| 47 |
USHORT instruction_control; |
| 48 |
SHORT round_state; |
| 49 |
|
| 50 |
F26Dot6 control_value_cut_in; |
| 51 |
F26Dot6 minimum_distance; |
| 52 |
F26Dot6 single_width_cut_in; |
| 53 |
FWord single_width_value; |
| 54 |
|
| 55 |
ULONG delta_base; |
| 56 |
ULONG delta_shift; |
| 57 |
|
| 58 |
/* unit vectors */ |
| 59 |
TTFUnitVector dual_projection_vector; |
| 60 |
TTFUnitVector freedom_vector; |
| 61 |
TTFUnitVector projection_vector; |
| 62 |
|
| 63 |
/* reference points */ |
| 64 |
ULONG rp0; |
| 65 |
ULONG rp1; |
| 66 |
ULONG rp2; |
| 67 |
|
| 68 |
/* zone pointers: take only 0 or 1 as values */ |
| 69 |
ULONG zp0; |
| 70 |
ULONG zp1; |
| 71 |
ULONG zp2; |
| 72 |
|
| 73 |
SHORT gep0; |
| 74 |
SHORT gep1; |
| 75 |
SHORT gep2; |
| 76 |
|
| 77 |
ULONG loop; |
| 78 |
} |
| 79 |
GraphicsState; |
| 80 |
|
| 81 |
#define GS_DEFAULT |
| 82 |
|
| 83 |
#endif /* __TTF_GSTATE_H */ |
| 84 |
|
| 85 |
|
| 86 |
/* end of gstate.h */ |