1/*
2 *
3 * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved
4 *
5 */
6
7#ifndef __SCRIPTANDLANGUAGE_H
8#define __SCRIPTANDLANGUAGE_H
9
10/**
11 * \file
12 * \internal
13 */
14
15#include "LETypes.h"
16#include "OpenTypeTables.h"
17
18U_NAMESPACE_BEGIN
19
20typedef TagAndOffsetRecord LangSysRecord;
21
22struct LangSysTable
23{
24    Offset    lookupOrderOffset;
25    le_uint16 reqFeatureIndex;
26    le_uint16 featureCount;
27    le_uint16 featureIndexArray[ANY_NUMBER];
28};
29
30struct ScriptTable
31{
32    Offset              defaultLangSysTableOffset;
33    le_uint16           langSysCount;
34    LangSysRecord       langSysRecordArray[ANY_NUMBER];
35
36    const LangSysTable  *findLanguage(LETag languageTag, le_bool exactMatch = FALSE) const;
37};
38
39typedef TagAndOffsetRecord ScriptRecord;
40
41struct ScriptListTable
42{
43    le_uint16           scriptCount;
44    ScriptRecord        scriptRecordArray[ANY_NUMBER];
45
46    const ScriptTable   *findScript(LETag scriptTag) const;
47    const LangSysTable  *findLanguage(LETag scriptTag, LETag languageTag, le_bool exactMatch = FALSE) const;
48};
49
50U_NAMESPACE_END
51#endif
52
53