Beispiel #1
0
 public DIWrapperSource(int indGlyphOwner, GConsts.TypeGlyph typeGlyph,
     GScope.TypeGScope scope)
 {
     this.indGlyphOwner=indGlyphOwner;
     this.typeGlyph=typeGlyph;
     this.scope=scope;
 }
Beispiel #2
0
        public GErrExtremeNotOnCurve(int indGlyph, 
            GConsts.TypeGlyph typeGlyph,
            BoxD bboxCP, BoxD bboxOutl) 
        {
            // ValInfoBasic
            base.TypeBasic = ValInfoType.Warning;
            base.Name = "GERR_EXTEREME_NOT_ON_CURVE";
            base.ValueUser = null;
            base.NameFileErrs = GErrConsts.FILE_RES_GERR_STRINGS;
            base.NameAsmFileErrs = GErrConsts.ASM_RES_GERR_STRINGS;
            base.TagPrincipal = "glyf";

            // GErr
            base.indexGlyphOwner =indGlyph;
            base.severity = GErr.TypeGErrSeverity.Middle;
            base.SetScope(GScope.TypeGScope._GGB_,GScope.TypeGScope._GGO_);
            base.typeGlyph=typeGlyph;
            
            // this
            this.bboxCP=new BoxD(bboxCP);
            this.bboxOutl=new BoxD(bboxOutl);
        }
Beispiel #3
0
        public GErrBBox(int indGlyph, GConsts.TypeGlyph typeGlyph,
            BoxD bboxInit, BoxD bboxCP) 
        {
            // ValInfoBasic
            base.TypeBasic = ValInfoType.Error;
            base.Name = "GERR_BBOX";
            base.ValueUser = null;
            base.NameFileErrs = GErrConsts.FILE_RES_GERR_STRINGS;
            base.NameAsmFileErrs = GErrConsts.ASM_RES_GERR_STRINGS;
            base.TagPrincipal = "glyf";

            // GErr
            base.indexGlyphOwner =indGlyph;
            base.severity = GErr.TypeGErrSeverity.Middle;
            base.SetScope(GScope.TypeGScope._GGB_,GScope.TypeGScope._GGO_);
            base.typeGlyph=typeGlyph;
            
            // this
            this.bboxInit=new BoxD(bboxInit);
            this.bboxCP=new BoxD(bboxCP);
        }
Beispiel #4
0
        /*
         *        CONSTRUCTOR
         */
        public GErrSource(ValInfoBasic info,
            int indGlyphOwner, GConsts.TypeGlyph typeGlyph,
            GScope.TypeGScope scope)
        {
            // ValInfoBasic
            base.TypeBasic = info.TypeBasic;
            base.Name = info.Name;
            base.ValueUser = info.ValueUser;
            base.NameFileErrs = info.NameFileErrs;
            base.NameAsmFileErrs = info.NameAsmFileErrs;
            base.TagPrincipal = info.TagPrincipal;


            // GErr
            base.indexGlyphOwner=indGlyphOwner;
            base.typeGlyph=typeGlyph;
            if (info.TypeBasic==ValInfoBasic.ValInfoType.Error)
            {
                base.severity=GErr.TypeGErrSeverity.Fatal;
            }
            else if (info.TypeBasic==ValInfoBasic.ValInfoType.Warning)
            {
                base.severity=GErr.TypeGErrSeverity.Low;
            }
            else
            {
                base.severity=GErr.TypeGErrSeverity.Undef;
            }
            base.SetScope(scope);
        }        
Beispiel #5
0
 public GErrValidation(int indGlyph, 
     GConsts.TypeGlyph typeGlyph,
     DefsGV.TypeGV typeGV,
     StatusGV.TypeStatusExec statusExec,
     Exception exception) :
     base(indGlyph,typeGlyph,exception)
 {
     this.typeGV=typeGV;
     this.statusExec=statusExec;
     switch (statusExec)
     {
         case StatusGV.TypeStatusExec.Aborted:
             base.m_Type=ValInfoBasic.ValInfoType.AppError;
             base.Name="GERR_VAL_ABORTED";
             base.Severity=GErr.TypeGErrSeverity.High;
             break;
         case StatusGV.TypeStatusExec.UnableToExec:
             base.m_Type=ValInfoBasic.ValInfoType.AppError;
             base.Name="GERR_VAL_UNABLE_TO_PERFORM_TEST";
             base.Severity=GErr.TypeGErrSeverity.Low;
             break;
         default:        // should not occur
             break;
     }
     GErrSign.Sign(this,this.typeGV,this.indexGlyphOwner);
 }
Beispiel #6
0
        public GErrApplication(int indGlyph,
            GConsts.TypeGlyph typeGlyph,
            Exception exception)
        {
            // ValInfoBasic
            base.TypeBasic = ValInfoType.AppError;
            base.Name = "GERR_APPLICATION";
            base.ValueUser = null;
            base.NameFileErrs = GErrConsts.FILE_RES_GERR_STRINGS;
            base.NameAsmFileErrs = GErrConsts.ASM_RES_GERR_STRINGS;
            base.TagPrincipal = "glyf";

            // GErr
            base.indexGlyphOwner =indGlyph;
            base.severity = GErr.TypeGErrSeverity.High;
            base.SetScope(GScope.TypeGScope._UNDEF_);
            base.typeGlyph=typeGlyph;
            
            // this
            this.strException=this.ExceptionToString(exception);
            GErrSign.Sign(this,DefsGV.TypeGV.Invalid,this.indexGlyphOwner);
        }
 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;
 }