-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathATSLayoutTypes.h
149 lines (122 loc) · 5.71 KB
/
ATSLayoutTypes.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
/*
File: ATSLayoutTypes.h
Contains: Apple Type Services layout public structures and constants.
Version: Technology: Mac OS 9/Carbon
Release: Universal Interfaces 3.4
Copyright: © 1994-2001 by Apple Computer, Inc., all rights reserved.
Bugs?: For bug reports, consult the following page on
the World Wide Web:
http://developer.apple.com/bugreporter/
*/
#ifndef __ATSLAYOUTTYPES__
#define __ATSLAYOUTTYPES__
#ifndef __MACTYPES__
#include <MacTypes.h>
#endif
#ifndef __SFNTLAYOUTTYPES__
#include <SFNTLayoutTypes.h>
#endif
#ifndef __ATSTYPES__
#include <ATSTypes.h>
#endif
#if PRAGMA_ONCE
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if PRAGMA_IMPORT
#pragma import on
#endif
#if PRAGMA_STRUCT_ALIGN
#pragma options align=mac68k
#elif PRAGMA_STRUCT_PACKPUSH
#pragma pack(push, 2)
#elif PRAGMA_STRUCT_PACK
#pragma pack(2)
#endif
/* --------------------------------------------------------------------------- */
/* CONSTANTS and related scalar types */
/* --------------------------------------------------------------------------- */
/* Miscellaneous constants */
enum {
kATSUseLineHeight = 0x7FFFFFFF, /* assignment to use natural line ascent/descent values */
kATSNoTracking = (long)0x80000000 /* negativeInfinity */
};
typedef UInt32 ATSLineLayoutOptions;
enum {
kATSLineNoLayoutOptions = 0x00000000, /* no options */
kATSLineIsDisplayOnly = 0x00000001, /* specifies to optimize for displaying text only */
kATSLineHasNoHangers = 0x00000002, /* specifies that no hangers to be formed on the line */
kATSLineHasNoOpticalAlignment = 0x00000004, /* specifies that no optical alignment to be performed on the line */
kATSLineKeepSpacesOutOfMargin = 0x00000008, /* specifies that space charcters should not be treated as hangers */
kATSLineNoSpecialJustification = 0x00000010, /* specifies no post-compensation justification is to be performed */
kATSLineLastNoJustification = 0x00000020, /* specifies that if the line is the last of a paragraph, it will not get justified */
kATSLineFractDisable = 0x00000040, /* specifies that the displayed line glyphs will adjust for device metrics */
kATSLineImposeNoAngleForEnds = 0x00000080, /* specifies that the carets at the ends of the line will be guarenteed to be perpendicular to the baseline */
kATSLineFillOutToWidth = 0x00000100, /* highlights for the line end characters will be extended to 0 and the specified line width */
kATSLineTabAdjustEnabled = 0x00000200, /* specifies that the tab character width will be automatically adjusted to fit the specified line width */
kATSLineAppleReserved = (long)0xFFFFFC00 /* these bits are reserved by Apple and will result in a invalid value error if attemped to set */
};
typedef UInt32 ATSStyleRenderingOptions;
enum {
kATSStyleNoOptions = 0x00000000, /* no options */
kATSStyleApplyHints = 0x00000001, /* specifies that ATS produce "hinted" glyph outlines (default is on) */
/* kATSStyleApplyAntiAliasing = 0x00000002L, |* specifies that ATS produce antialiased glyph images (default is on) future feature *|*/
kATSStyleAppleReserved = (long)0xFFFFFFFE /* these bits are reserved by Apple and will result in a invalid value error if attemped to set */
};
/* For accessing glyph bounds */
enum {
kATSUseCaretOrigins = 0,
kATSUseDeviceOrigins = 1,
kATSUseFractionalOrigins = 2,
kATSUseOriginFlags = 3
};
/* --------------------------------------------------------------------------- */
/* STRUCTURED TYPES and related constants */
/* --------------------------------------------------------------------------- */
/*
The ATSTrapezoid structure supplies a convenient container
for glyph bounds in trapezoidal form.
*/
struct ATSTrapezoid {
FixedPoint upperLeft;
FixedPoint upperRight;
FixedPoint lowerRight;
FixedPoint lowerLeft;
};
typedef struct ATSTrapezoid ATSTrapezoid;
/*
The JustWidthDeltaEntryOverride structure specifies values for the grow and shrink case during
justification, both on the left and on the right. It also contains flags. This particular structure
is used for passing justification overrides to LLC. For further sfnt resource 'just' table
constants and structures, see SFNTLayoutTypes.h.
*/
struct ATSJustWidthDeltaEntryOverride {
Fixed beforeGrowLimit; /* ems AW can grow by at most on LT */
Fixed beforeShrinkLimit; /* ems AW can shrink by at most on LT */
Fixed afterGrowLimit; /* ems AW can grow by at most on RB */
Fixed afterShrinkLimit; /* ems AW can shrink by at most on RB */
JustificationFlags growFlags; /* flags controlling grow case */
JustificationFlags shrinkFlags; /* flags controlling shrink case */
};
typedef struct ATSJustWidthDeltaEntryOverride ATSJustWidthDeltaEntryOverride;
/* The JustPriorityOverrides type is an array of 4 width delta records, one per priority level override. */
typedef ATSJustWidthDeltaEntryOverride ATSJustPriorityWidthDeltaOverrides[4];
/* --------------------------------------------------------------------------- */
#if PRAGMA_STRUCT_ALIGN
#pragma options align=reset
#elif PRAGMA_STRUCT_PACKPUSH
#pragma pack(pop)
#elif PRAGMA_STRUCT_PACK
#pragma pack()
#endif
#ifdef PRAGMA_IMPORT_OFF
#pragma import off
#elif PRAGMA_IMPORT
#pragma import reset
#endif
#ifdef __cplusplus
}
#endif
#endif /* __ATSLAYOUTTYPES__ */