Ejemplo n.º 1
0
            public override OTTable GenerateTable()
            {
                if (null == m_newbuf)
                {
                    throw new ArgumentNullException("EBDT cache buffer needs to be set by the EBLC cache first.");
                }

                m_newbuf.SetFixed(m_version, (uint)Table_EBDT.FieldOffsets.version);

                // put the buffer into a Table_EBDT object and return it
                Table_EBDT EBDTTable = new Table_EBDT("EBDT", m_newbuf);

                return(EBDTTable);
            }
Ejemplo n.º 2
0
        public virtual OTTable CreateTableObject(OTTag tag, MBOBuffer buf)
        {
            OTTable table = null;

            string sName = GetUnaliasedTableName(tag);

            switch (sName)
            {
            case "BASE": table = new Table_BASE(tag, buf); break;

            case "CFF ": table = new Table_CFF(tag, buf); break;

            case "cmap": table = new Table_cmap(tag, buf); break;

            case "cvt ": table = new Table_cvt(tag, buf); break;

            case "DSIG": table = new Table_DSIG(tag, buf); break;

            case "EBDT": table = new Table_EBDT(tag, buf); break;

            case "EBLC": table = new Table_EBLC(tag, buf); break;

            case "EBSC": table = new Table_EBSC(tag, buf); break;

            case "fpgm": table = new Table_fpgm(tag, buf); break;

            case "gasp": table = new Table_gasp(tag, buf); break;

            case "GDEF": table = new Table_GDEF(tag, buf); break;

            case "glyf": table = new Table_glyf(tag, buf); break;

            case "GPOS": table = new Table_GPOS(tag, buf); break;

            case "GSUB": table = new Table_GSUB(tag, buf); break;

            case "hdmx": table = new Table_hdmx(tag, buf); break;

            case "head": table = new Table_head(tag, buf); break;

            case "hhea": table = new Table_hhea(tag, buf); break;

            case "hmtx": table = new Table_hmtx(tag, buf); break;

            case "JSTF": table = new Table_JSTF(tag, buf); break;

            case "kern": table = new Table_kern(tag, buf); break;

            case "loca": table = new Table_loca(tag, buf); break;

            case "LTSH": table = new Table_LTSH(tag, buf); break;

            case "maxp": table = new Table_maxp(tag, buf); break;

            case "name": table = new Table_name(tag, buf); break;

            case "OS/2": table = new Table_OS2(tag, buf); break;

            case "PCLT": table = new Table_PCLT(tag, buf); break;

            case "post": table = new Table_post(tag, buf); break;

            case "prep": table = new Table_prep(tag, buf); break;

            case "VDMX": table = new Table_VDMX(tag, buf); break;

            case "vhea": table = new Table_vhea(tag, buf); break;

            case "vmtx": table = new Table_vmtx(tag, buf); break;

            case "VORG": table = new Table_VORG(tag, buf); break;

            //case "Zapf": table = new Table_Zapf(tag, buf); break;
            default: table = new Table__Unknown(tag, buf); break;
            }

            return(table);
        }
Ejemplo n.º 3
0
        public virtual OTTable CreateTableObject(OTTag tag, MBOBuffer buf)
        {
            OTTable table = null;

            string sName = GetUnaliasedTableName(tag);

            switch (sName)
            {
                case "BASE": table = new Table_BASE(tag, buf); break;
                case "CFF ": table = new Table_CFF(tag, buf); break;
                case "cmap": table = new Table_cmap(tag, buf); break;
                case "cvt ": table = new Table_cvt(tag, buf); break;
                case "DSIG": table = new Table_DSIG(tag, buf); break;
                case "EBDT": table = new Table_EBDT(tag, buf); break;
                case "EBLC": table = new Table_EBLC(tag, buf); break;
                case "EBSC": table = new Table_EBSC(tag, buf); break;
                case "fpgm": table = new Table_fpgm(tag, buf); break;
                case "gasp": table = new Table_gasp(tag, buf); break;
                case "GDEF": table = new Table_GDEF(tag, buf); break;
                case "glyf": table = new Table_glyf(tag, buf); break;
                case "GPOS": table = new Table_GPOS(tag, buf); break;
                case "GSUB": table = new Table_GSUB(tag, buf); break;
                case "hdmx": table = new Table_hdmx(tag, buf); break;
                case "head": table = new Table_head(tag, buf); break;
                case "hhea": table = new Table_hhea(tag, buf); break;
                case "hmtx": table = new Table_hmtx(tag, buf); break;
                case "JSTF": table = new Table_JSTF(tag, buf); break;
                case "kern": table = new Table_kern(tag, buf); break;
                case "loca": table = new Table_loca(tag, buf); break;
                case "LTSH": table = new Table_LTSH(tag, buf); break;
                case "maxp": table = new Table_maxp(tag, buf); break;
                case "name": table = new Table_name(tag, buf); break;
                case "OS/2": table = new Table_OS2(tag, buf); break;
                case "PCLT": table = new Table_PCLT(tag, buf); break;
                case "post": table = new Table_post(tag, buf); break;
                case "prep": table = new Table_prep(tag, buf); break;
                case "VDMX": table = new Table_VDMX(tag, buf); break;
                case "vhea": table = new Table_vhea(tag, buf); break;
                case "vmtx": table = new Table_vmtx(tag, buf); break;
                case "VORG": table = new Table_VORG(tag, buf); break;
                //case "Zapf": table = new Table_Zapf(tag, buf); break;
                default: table = new Table__Unknown(tag, buf); break;
            }

            return table;
        }
Ejemplo n.º 4
0
            public override OTTable GenerateTable()
            {
                if( null == m_newbuf )
                {
                    throw new ArgumentNullException( "EBDT cache buffer needs to be set by the EBLC cache first." );
                }

                m_newbuf.SetFixed( m_version,    (uint)Table_EBDT.FieldOffsets.version );

                // put the buffer into a Table_EBDT object and return it
                Table_EBDT EBDTTable = new Table_EBDT( "EBDT", m_newbuf );
            
                return EBDTTable;
            }
Ejemplo n.º 5
0
 // constructor
 public EBDT_cache(Table_EBDT OwnerTable)
 {
     // copy the data from the owner table's MBOBuffer
     // and store it in the cache variables
     m_version = OwnerTable.version;
 }
Ejemplo n.º 6
0
            // constructor
            public EBLC_cache( Table_EBLC OwnerTable )
            {
                // copy the data from the owner table's MBOBuffer
                // and store it in the cache variables
                m_version = OwnerTable.version;
                m_numSizes = OwnerTable.numSizes;
                m_tableEBDT = OwnerTable.getTableEDBT();

                m_bitmapSizeTables = new ArrayList( (int)m_numSizes );

                for( uint i = 0; i < m_numSizes; i++ )
                {
                    bitmapSizeTable bst = OwnerTable.GetBitmapSizeTable( i );
                    m_bitmapSizeTables.Add( new bitmapSizeTableCache( OwnerTable, bst ));
                }

            }
Ejemplo n.º 7
0
        public bool setTableEDBT( Table_EBDT tableEDBT )
        {
            bool bResult = true;

            if( tableEDBT == null )
            {
                bResult = false;
                throw new ArgumentNullException( "tableEDBT has not been set and is null." );
            }
            else
            {
                m_tableEDBT = tableEDBT;
            }

            return bResult;
        }
Ejemplo n.º 8
0
 public Table_EBLC(OTTag tag, MBOBuffer buf, Table_EBDT tableEDBT ) : base(tag, buf)
 {
 }
Ejemplo n.º 9
0
                protected ArrayList m_componentArray; //Table_EBDT.ebdtComponent[]

                public imageCache9( Table_EBDT.bigGlyphMetrics cBigMetrics, ushort nNumComponents, ArrayList cComponentArray )
                {                    
                    bigMetrics = cBigMetrics;
                    numComponents = nNumComponents;
                    m_componentArray = (ArrayList)cComponentArray.Clone();
                }
Ejemplo n.º 10
0
                protected ArrayList m_componentArray; //Table_EBDT.ebdtComponent[]

                public imageCache8( Table_EBDT.smallGlyphMetrics cSmallMetrics, ushort nNumComponents, ArrayList cComponentArray )
                {                    
                    smallMetrics = cSmallMetrics;
                    //pad = bPad;
                    numComponents = nNumComponents;
                    m_componentArray = (ArrayList)cComponentArray.Clone();
                }
Ejemplo n.º 11
0
 public imageCache7( Table_EBDT.bigGlyphMetrics cBigMetrics, byte[] bImageData )
 {    
     bigMetrics = cBigMetrics;
     imageData = bImageData;
 }
Ejemplo n.º 12
0
 public imageCache2( Table_EBDT.smallGlyphMetrics cSmallMetrics, byte[] bImageData )
 {                        
     smallMetrics = cSmallMetrics;
     imageData = bImageData;
 }
Ejemplo n.º 13
0
 public indexSubTableCache5( ushort nIndexFormat, ushort nImageFormat, ArrayList cImageCache, uint nImageSize, Table_EBDT.bigGlyphMetrics cBigMetrics, ArrayList cGlyphCode ) : base( nIndexFormat, nImageFormat, cImageCache )
 {
     imageSize = nImageSize;
     bigMetrics = cBigMetrics;                
     m_glyphCode = (ArrayList)cGlyphCode.Clone();
 }
Ejemplo n.º 14
0
 public indexSubTableCache2( ushort nIndexFormat, ushort nImageFormat, ArrayList cImageCache, uint nImageSize, Table_EBDT.bigGlyphMetrics cBigMetrics ) : base( nIndexFormat, nImageFormat, cImageCache )
 {
     imageSize = nImageSize;
     bigMetrics = cBigMetrics;                    
 }
Ejemplo n.º 15
0
                private imageCache getEBDTImageFormat( Table_EBDT tableEDBT , indexSubTable ist, uint nGlyphIndex, uint nStartGlyphIndex )
                {                    
                    imageCache ic = null;
                    
            
                    switch( ist.header.imageFormat )
                    {
                        case 1:
                        {
                            Table_EBDT.smallGlyphMetrics sgm = tableEDBT.GetSmallMetrics( ist, nGlyphIndex, nStartGlyphIndex );
                            byte[] bData = tableEDBT.GetImageData( ist, nGlyphIndex, nStartGlyphIndex );
                            ic = new imageCache1( sgm, bData );                            
                            break;
                        }
                        case 2:
                        {
                            Table_EBDT.smallGlyphMetrics sgm = tableEDBT.GetSmallMetrics( ist, nGlyphIndex, nStartGlyphIndex );
                            byte[] bData = tableEDBT.GetImageData( ist, nGlyphIndex, nStartGlyphIndex );
                            ic = new imageCache2( sgm, bData );
                            break;
                        }                        
                        case 5:
                        {
                            byte[] bData = tableEDBT.GetImageData( ist, nGlyphIndex, nStartGlyphIndex );
                            ic = new imageCache5( bData );                            
                            break;
                        }        
                        case 6:
                        {
                            Table_EBDT.bigGlyphMetrics bgm = tableEDBT.GetBigMetrics( ist, nGlyphIndex, nStartGlyphIndex );
                            byte[] bData = tableEDBT.GetImageData( ist, nGlyphIndex, nStartGlyphIndex );
                            ic = new imageCache6( bgm, bData );
                            break;
                        }        
                        case 7:
                        {
                            Table_EBDT.bigGlyphMetrics bgm = tableEDBT.GetBigMetrics( ist, nGlyphIndex, nStartGlyphIndex );
                            byte[] bData = tableEDBT.GetImageData( ist, nGlyphIndex, nStartGlyphIndex );
                            ic = new imageCache7( bgm, bData );                        
                            break;
                        }        
                        case 8:
                        {
                            Table_EBDT.smallGlyphMetrics sgm = tableEDBT.GetSmallMetrics( ist, nGlyphIndex, nStartGlyphIndex );
                            ushort nNumComp = tableEDBT.GetNumComponents( ist, nGlyphIndex, nStartGlyphIndex );
                            ArrayList components = new ArrayList( nNumComp );
                            for( uint i = 0; i < nNumComp; i++ )
                            {
                                components.Add( tableEDBT.GetComponent( ist, nGlyphIndex, nStartGlyphIndex, i ));                                
                            }
                            ic = new imageCache8( sgm, nNumComp, components );                    
                            break;
                        }        
                        case 9:
                        {
                            Table_EBDT.bigGlyphMetrics bgm = tableEDBT.GetBigMetrics( ist, nGlyphIndex, nStartGlyphIndex );
                            ushort nNumComp = tableEDBT.GetNumComponents( ist, nGlyphIndex, nStartGlyphIndex );
                            ArrayList components = new ArrayList( nNumComp );
                            for( uint i = 0; i < nNumComp; i++ )
                            {
                                components.Add( tableEDBT.GetComponent( ist, nGlyphIndex, nStartGlyphIndex, i ));                                
                            }
                            ic = new imageCache9( bgm, nNumComp, components );                        
                            break;
                        }        
                        default:
                            Debug.Assert( false, "unsupported image format" );
                            break;
                        
                    }

                    return ic;
                }                
Ejemplo n.º 16
0
 // constructor
 public EBDT_cache(Table_EBDT OwnerTable)
 {
     // copy the data from the owner table's MBOBuffer
     // and store it in the cache variables
     m_version = OwnerTable.version;
 }