-
Notifications
You must be signed in to change notification settings - Fork 1
/
UniscribeLayoutData.h
49 lines (37 loc) · 1.18 KB
/
UniscribeLayoutData.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
// UniscribeLayoutData.h
#ifndef UniscribeLayoutData_h
#define UniscribeLayoutData_h
#include "UniscribeTextRun.h"
#include "UTF16Ref.h"
#include <memory>
#include <vector>
#include <windows.h>
#include <usp10.h>
class UniscribeLayoutData
{
public:
UniscribeLayoutData( UTF16Ref text, bool endsWithNewline );
void AddRun( UniscribeTextRun,
const std::vector<WORD>& logClusters,
const std::vector<WORD>& glyphs,
const std::vector<SCRIPT_VISATTR>& visAttrs,
const std::vector<int>& advanceWidths,
const std::vector<GOFFSET>& offsets );
UniscribeTextRun DiscardFrom( size_t position );
size_t length;
bool endsWithNewline;
// Block data
std::vector<UniscribeTextRun> runs;
std::vector<size_t> lines;
// ScriptItemize data
std::vector<SCRIPT_ITEM> items;
// ScriptShape data
std::vector<WORD> logClusters;
std::vector<WORD> glyphs;
std::vector<SCRIPT_VISATTR> visAttrs;
// ScriptPlace data
std::vector<int> advanceWidths;
std::vector<GOFFSET> offsets;
};
typedef std::unique_ptr<UniscribeLayoutData> UniscribeLayoutDataPtr;
#endif