• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *
3  * (C) Copyright IBM Corp. 1998-2013 - 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 
18 U_NAMESPACE_BEGIN
19 
20 typedef TagAndOffsetRecord LangSysRecord;
21 
22 struct LangSysTable
23 {
24     Offset    lookupOrderOffset;
25     le_uint16 reqFeatureIndex;
26     le_uint16 featureCount;
27     le_uint16 featureIndexArray[ANY_NUMBER];
28 };
29 LE_VAR_ARRAY(LangSysTable, featureIndexArray)
30 
31 struct ScriptTable
32 {
33     Offset              defaultLangSysTableOffset;
34     le_uint16           langSysCount;
35     LangSysRecord       langSysRecordArray[ANY_NUMBER];
36 
37   LEReferenceTo<LangSysTable>  findLanguage(const LETableReference &base, LETag languageTag, LEErrorCode &success, le_bool exactMatch = FALSE) const;
38 };
39 LE_VAR_ARRAY(ScriptTable, langSysRecordArray)
40 
41 typedef TagAndOffsetRecord ScriptRecord;
42 
43 struct ScriptListTable
44 {
45     le_uint16           scriptCount;
46     ScriptRecord        scriptRecordArray[ANY_NUMBER];
47 
48   LEReferenceTo<ScriptTable>   findScript(const LETableReference &base, LETag scriptTag, LEErrorCode &success) const;
49   LEReferenceTo<LangSysTable>  findLanguage(const LETableReference &base, LETag scriptTag, LETag languageTag, LEErrorCode &success, le_bool exactMatch = FALSE) const;
50 };
51 LE_VAR_ARRAY(ScriptListTable, scriptRecordArray)
52 
53 U_NAMESPACE_END
54 #endif
55 
56