/* * METHODS: add/remove DIAs */ public bool DIAAdd(object obj, string nameDIA, FManager.TypeActionOnErr flag) { switch (flag) { case FManager.TypeActionOnErr.onDelete: return (this.dia_OnErrorDelete.AddDeleg(obj, nameDIA)); case FManager.TypeActionOnErr.onAdd: return (this.dia_OnErrorAdd.AddDeleg(obj, nameDIA)); default: return false; } }
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(); } }
public void ClearRelease() { if (this.bbox != null) { this.bbox.Clear(); this.bbox = null; } if (this.comp != null) { this.comp.ClearRelease(); this.comp = null; } if (this.outl != null) { this.outl.ClearRelease(); this.outl = null; } this.index = GConsts.IND_UNINITIALIZED; this.fm = null; }
public void ClearDestroy() { if (this.bbox != null) { this.bbox.Clear(); this.bbox = null; } if (this.comp != null) { this.comp.ClearDestroy(); this.comp = null; } if (this.outl != null) { this.outl.ClearDestroy(); this.outl = null; } if (this.statusGV != null) { this.statusGV = null; } this.index = GConsts.IND_UNINITIALIZED; this.fm = null; }
public bool Validate(Validator validator, OTFontVal fontOwner) { bool bRet = true; if (!validator.PerformTest(T.glyf_ValidateAll)) { return true; } this.m_diaValidate=validator.DIA; this.m_cnts=new int[this.m_namesInfoCnt.Length]; for (int iCnt=0; iCnt<this.m_cnts.Length; iCnt++) { this.m_cnts[iCnt]=0; } I_IOGlyphsFile i_IOGlyphs=new I_IOGlyphsFile(); if (!i_IOGlyphs.Initialize(fontOwner,validator)) { return false; // the error is already reported } DIAction diaFilter= DIActionBuilder.DIA(this,"DIAFunc_Filter"); FManager fm=new FManager(i_IOGlyphs, null, null); int numGlyph=fm.FNumGlyph; int indGlyph; for (indGlyph=0; indGlyph<numGlyph; indGlyph++) { try { validator.OnTableProgress("Validating glyph with index "+indGlyph+" (out of "+numGlyph+" glyphs)"); Glyph glyph=fm.GGet(indGlyph); glyph.GValidate(); bRet &= fm.GErrGetInformed(indGlyph,diaFilter); fm.ClearManagementStructs(); } catch { validator.Error(T.T_NULL, E.glyf_E_ExceptionUnhandeled, (OTTag)"glyf", "Glyph index "+indGlyph); } if (validator.CancelFlag) break; } i_IOGlyphs.Clear(); fm.ClearDestroy(); fm=null; /* I_ProgressUpdater i_ProgressUpdater=new ValidationCancel(validator); FManager fm=new FManager(i_IOGlyphs, null, null); DIAction diaFilter= DIActionBuilder.DIA(this,"DIAFunc_Filter"); fm.GErrActionAdd(diaFilter, FManager.TypeActionOnErr.onAdd); fm.FValidate(GConsts.IND_UNINITIALIZED, GConsts.IND_UNINITIALIZED); i_IOGlyphs.Clear(); i_ProgressUpdater.Clear(); fm.ClearDestroy(); fm=null; */ for (int iCnt=0; iCnt<this.m_cnts.Length; iCnt++) { if (this.m_cnts[iCnt]>0) { bool isGErr=this.m_namesInfoCnt[iCnt].StartsWith("GERR_"); string nameFileErr=isGErr? GErrConsts.FILE_RES_GERR_STRINGS: GErrConsts.FILE_RES_OTFFERR_STRINGS; string nameAsmFileErr=isGErr? GErrConsts.ASM_RES_GERR_STRINGS: GErrConsts.ASM_RES_OTFFERR_STRINGS; string strDetails="Number of glyphs with the warning = "+this.m_cnts[iCnt]; if (validator.CancelFlag) strDetails+=" (Validation cancelled)"; ValInfoBasic info=new ValInfoBasic( ValInfoBasic.ValInfoType.Warning, this.m_namesInfoCnt[iCnt], strDetails, nameFileErr, nameAsmFileErr, "glyf", null); validator.DIA(info); } } this.m_cnts=null; return bRet; }
public bool DIAAdd(DIAction dia, FManager.TypeActionOnErr flag) { switch (flag) { case FManager.TypeActionOnErr.onDelete: return (this.dia_OnErrorDelete.AddDeleg(dia)); case FManager.TypeActionOnErr.onAdd: return (this.dia_OnErrorAdd.AddDeleg(dia)); default: return false; } }
public void ClearRelease() { if (this.bbox!=null) { this.bbox.Clear(); this.bbox=null; } if (this.comp!=null) { this.comp.ClearRelease(); this.comp=null; } if (this.outl!=null) { this.outl.ClearRelease(); this.outl=null; } this.index=GConsts.IND_UNINITIALIZED; this.fm=null; }
public void ClearDestroy() { if (this.bbox!=null) { this.bbox.Clear(); this.bbox=null; } if (this.comp!=null) { this.comp.ClearDestroy(); this.comp=null; } if (this.outl!=null) { this.outl.ClearDestroy(); this.outl=null; } if (this.statusGV!=null) { this.statusGV=null; } this.index=GConsts.IND_UNINITIALIZED; this.fm=null; }
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(); } }