public void ReadTypeGlyph(int indexGlyph, out GConsts.TypeGlyph typeGlyph, DIAction dia) { typeGlyph = GConsts.TypeGlyph.Undef; this.m_validator.DIA = dia; int offsStart, length; if (!this.m_tableLoca.GetValidateEntryGlyf(indexGlyph, out offsStart, out length, this.m_validator, this.m_font)) { return; } if (length == 0) { typeGlyph = GConsts.TypeGlyph.Empty; return; } if ((int)Table_glyf.FieldOffsets.numCont + 2 >= offsStart + length) { this.m_validator.Error( E._GEN_E_OffsetExceedsTableLength, (OTTag)"glyf"); return; } int numCont; numCont = this.m_tableGlyf.Buffer.GetShort((uint)(offsStart + (int)Table_glyf.FieldOffsets.numCont)); typeGlyph = (numCont >= 0)? GConsts.TypeGlyph.Simple: GConsts.TypeGlyph.Composite; }
public DIWrapperSource(int indGlyphOwner, GConsts.TypeGlyph typeGlyph, GScope.TypeGScope scope) { this.indGlyphOwner=indGlyphOwner; this.typeGlyph=typeGlyph; this.scope=scope; }
public Glyph(int indexGlyph, FManager fm) { this.fm = fm; this.index = indexGlyph; this.typeGlyph = GConsts.TypeGlyph.Uninitialized; this.bbox = null; this.outl = null; this.comp = null; this.statusGV = new StatusGV[DefsGV.NumTest]; for (int iTest = 0; iTest < DefsGV.NumTest; iTest++) { this.statusGV[iTest] = new StatusGV(); } }
private void CleanUpOnNonCompletedGV(DefsGV.TypeGV typeGV) { /* * TRY/CATCH function */ switch (typeGV) { case DefsGV.TypeGV.ValidateTypeGlyphSource: this.typeGlyph = GConsts.TypeGlyph.Undef; break; case DefsGV.TypeGV.ValidateSimpSource: if (this.bbox != null) { this.bbox = null; } if (this.outl != null) { try { this.outl.ClearDestroy(); } catch (System.Exception) { } this.outl = null; } break; case DefsGV.TypeGV.ValidateCompSource: if (this.bbox != null) { this.bbox = null; } if (this.comp != null) { try { this.comp.ClearDestroy(); } catch (System.Exception) { } this.comp = null; } break; case DefsGV.TypeGV.ValidateCompBind: if (this.outl != null) { try { this.outl.ClearDestroy(); } catch (System.Exception) { } this.outl = null; } break; } /* * private int index; * private GConsts.TypeGlyph typeGlyph; * BoxD bbox; * Outline outl; * Composite comp; * private FManager fm; * private StatusGV[] statusGV; */ }
private void CleanUpOnNonCompletedGV(DefsGV.TypeGV typeGV) { /* * TRY/CATCH function */ switch (typeGV) { case DefsGV.TypeGV.ValidateTypeGlyphSource: this.typeGlyph=GConsts.TypeGlyph.Undef; break; case DefsGV.TypeGV.ValidateSimpSource: if (this.bbox!=null) this.bbox=null; if (this.outl!=null) { try { this.outl.ClearDestroy(); } catch(System.Exception) { } this.outl=null; } break; case DefsGV.TypeGV.ValidateCompSource: if (this.bbox!=null) this.bbox=null; if (this.comp!=null) { try { this.comp.ClearDestroy(); } catch(System.Exception) { } this.comp=null; } break; case DefsGV.TypeGV.ValidateCompBind: if (this.outl!=null) { try { this.outl.ClearDestroy(); } catch(System.Exception) { } this.outl=null; } break; } /* private int index; private GConsts.TypeGlyph typeGlyph; BoxD bbox; Outline outl; Composite comp; private FManager fm; private StatusGV[] statusGV; */ }
public Glyph(int indexGlyph, FManager fm) { this.fm=fm; this.index=indexGlyph; this.typeGlyph=GConsts.TypeGlyph.Uninitialized; this.bbox=null; this.outl=null; this.comp=null; this.statusGV=new StatusGV[DefsGV.NumTest]; for (int iTest=0; iTest<DefsGV.NumTest; iTest++) { this.statusGV[iTest]=new StatusGV(); } }