summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/mfluadir/otfcc/include/otfcc/glyph-order.h
blob: 68ff92d9ec71e678b897a9b8f825ab78c5504213 (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
#ifndef CARYLL_INCLUDE_GLYPH_ORDER_H
#define CARYLL_INCLUDE_GLYPH_ORDER_H

#include "dep/sds.h"
#include "dep/json.h"
#include "dep/uthash.h"
#include "caryll/ownership.h"
#include "otfcc/primitives.h"
#include "otfcc/handle.h"
#include "otfcc/options.h"

typedef struct {
	glyphid_t gid;
	sds name;
	uint8_t orderType;
	uint32_t orderEntry;
	UT_hash_handle hhID;
	UT_hash_handle hhName;
} otfcc_GlyphOrderEntry;

typedef struct {
	otfcc_GlyphOrderEntry *byGID;
	otfcc_GlyphOrderEntry *byName;
} otfcc_GlyphOrder;

struct otfcc_GlyphOrderPackage {
	caryll_RT(otfcc_GlyphOrder);
	sds (*setByGID)(otfcc_GlyphOrder *go, glyphid_t gid, sds name);
	bool (*setByName)(otfcc_GlyphOrder *go, sds name, glyphid_t gid);
	bool (*nameAField_Shared)(otfcc_GlyphOrder *go, glyphid_t gid, sds *field); // return a shared name pointer
	bool (*consolidateHandle)(otfcc_GlyphOrder *go, otfcc_GlyphHandle *h);
	bool (*lookupName)(otfcc_GlyphOrder *go, sds name);
};

extern const struct otfcc_GlyphOrderPackage otfcc_pkgGlyphOrder;

#endif