os/textandloc/fontservices/textshaperplugin/IcuSource/layout/ScriptAndLanguage.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     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 
    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 
    30 struct 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 
    39 typedef TagAndOffsetRecord ScriptRecord;
    40 
    41 struct 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 
    50 U_NAMESPACE_END
    51 #endif
    52