blob: c5588d3305c8c3618e25c074683fe7ed6343c471 (
plain)
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
|
#ifndef CARYLL_cff_SUBR_H
#define CARYLL_cff_SUBR_H
#include "libcff.h"
#include "charstring-il.h"
typedef struct __cff_SubrRule cff_SubrRule;
typedef struct __cff_SubrNode cff_SubrNode;
struct __cff_SubrNode {
cff_SubrNode *prev;
cff_SubrRule *rule;
OWNING cff_SubrNode *next;
OWNING caryll_Buffer *terminal;
bool hard;
bool guard;
bool last;
};
struct __cff_SubrRule {
bool printed;
bool numbered;
uint32_t number;
uint32_t height;
uint32_t uniqueIndex;
uint16_t cffIndex;
uint32_t refcount;
uint32_t effectiveLength;
OWNING cff_SubrNode *guard;
OWNING cff_SubrRule *next;
};
typedef struct {
uint8_t arity;
uint8_t *key;
cff_SubrNode *start;
UT_hash_handle hh;
} cff_SubrDiagramIndex;
typedef struct {
OWNING cff_SubrRule *root;
cff_SubrRule *last;
cff_SubrDiagramIndex *diagramIndex;
uint32_t totalRules;
uint32_t totalCharStrings;
bool doSubroutinize;
} cff_SubrGraph;
extern caryll_RefElementInterface(cff_SubrGraph) cff_iSubrGraph;
void cff_insertILToGraph(cff_SubrGraph *g, cff_CharstringIL *il);
void cff_ilGraphToBuffers(cff_SubrGraph *g, caryll_Buffer **s, caryll_Buffer **gs, caryll_Buffer **ls,
const otfcc_Options *options);
#endif
|