Home | History | Annotate | Download | only in layout
      1 /*
      2  *
      3  * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
      4  *
      5  */
      6 
      7 #ifndef __GLYPHDEFINITIONTABLES_H
      8 #define __GLYPHDEFINITIONTABLES_H
      9 
     10 /**
     11  * \file
     12  * \internal
     13  */
     14 
     15 #include "LETypes.h"
     16 #include "OpenTypeTables.h"
     17 #include "ClassDefinitionTables.h"
     18 
     19 U_NAMESPACE_BEGIN
     20 
     21 typedef ClassDefinitionTable GlyphClassDefinitionTable;
     22 
     23 enum GlyphClassDefinitions
     24 {
     25     gcdNoGlyphClass     = 0,
     26     gcdSimpleGlyph      = 1,
     27     gcdLigatureGlyph    = 2,
     28     gcdMarkGlyph        = 3,
     29     gcdComponentGlyph   = 4
     30 };
     31 
     32 struct AttachmentListTable
     33 {
     34     Offset  coverageTableOffset;
     35     le_uint16  glyphCount;
     36     Offset  attachPointTableOffsetArray[ANY_NUMBER];
     37 };
     38 LE_VAR_ARRAY(AttachmentListTable, attachPointTableOffsetArray)
     39 
     40 struct AttachPointTable
     41 {
     42     le_uint16  pointCount;
     43     le_uint16  pointIndexArray[ANY_NUMBER];
     44 };
     45 LE_VAR_ARRAY(AttachPointTable, pointIndexArray)
     46 
     47 struct LigatureCaretListTable
     48 {
     49     Offset  coverageTableOffset;
     50     le_uint16  ligGlyphCount;
     51     Offset  ligGlyphTableOffsetArray[ANY_NUMBER];
     52 };
     53 LE_VAR_ARRAY(LigatureCaretListTable, ligGlyphTableOffsetArray)
     54 
     55 struct LigatureGlyphTable
     56 {
     57     le_uint16  caretCount;
     58     Offset  caretValueTableOffsetArray[ANY_NUMBER];
     59 };
     60 LE_VAR_ARRAY(LigatureGlyphTable, caretValueTableOffsetArray)
     61 
     62 struct CaretValueTable
     63 {
     64     le_uint16  caretValueFormat;
     65 };
     66 
     67 struct CaretValueFormat1Table : CaretValueTable
     68 {
     69     le_int16   coordinate;
     70 };
     71 
     72 struct CaretValueFormat2Table : CaretValueTable
     73 {
     74     le_uint16  caretValuePoint;
     75 };
     76 
     77 struct CaretValueFormat3Table : CaretValueTable
     78 {
     79     le_int16   coordinate;
     80     Offset  deviceTableOffset;
     81 };
     82 
     83 typedef ClassDefinitionTable MarkAttachClassDefinitionTable;
     84 
     85 struct GlyphDefinitionTableHeader
     86 {
     87     fixed32 version;
     88     Offset  glyphClassDefOffset;
     89     Offset  attachListOffset;
     90     Offset  ligCaretListOffset;
     91     Offset  MarkAttachClassDefOffset;
     92 
     93     const LEReferenceTo<GlyphClassDefinitionTable>
     94     getGlyphClassDefinitionTable(const LEReferenceTo<GlyphDefinitionTableHeader>& base,
     95                                  LEErrorCode &success) const;
     96     const LEReferenceTo<AttachmentListTable>
     97     getAttachmentListTable(const LEReferenceTo<GlyphDefinitionTableHeader>& base,
     98                            LEErrorCode &success)const ;
     99     const LEReferenceTo<LigatureCaretListTable>
    100     getLigatureCaretListTable(const LEReferenceTo<GlyphDefinitionTableHeader>& base,
    101                               LEErrorCode &success) const;
    102     const LEReferenceTo<MarkAttachClassDefinitionTable>
    103     getMarkAttachClassDefinitionTable(const LEReferenceTo<GlyphDefinitionTableHeader>& base,
    104                                       LEErrorCode &success) const;
    105 };
    106 
    107 U_NAMESPACE_END
    108 #endif
    109