protected void SetValue(List <double> list, byte key0, byte key1)
        {
            switch (key0)
            {
            case 0:
                version = (ushort)list[0];
                break;

            case 1:
                Notice = (ushort)list[0];
                break;

            case 2:
                FullName = (ushort)list[0];
                break;

            case 3:
                FamilyName = (ushort)list[0];
                break;

            case 4:
                Weight = (ushort)list[0];
                break;

            case 5:
                FontBBox = CFFArray.Create(list);
                break;

            case 12:
                SetValue12(list, key1);
                break;

            case 13:
                UniqueID = (int)list[0];
                break;

            case 14:
                XUID = CFFArray.Create(list);
                break;

            case 15:
                charset = (int)list[0];
                break;

            case 16:
                Encoding = (int)list[0];
                break;

            case 17:
                CharStrings = (int)list[0];
                break;

            case 18:
                Private = CFFArray.Create(list);
                break;
            }
        }
        public CFFTopDict()
        {
            const int DefaultSID = 0;

            version            = DefaultSID;
            Notice             = DefaultSID;
            Copyright          = DefaultSID;
            FullName           = DefaultSID;
            FamilyName         = DefaultSID;
            Weight             = DefaultSID;
            isFixedPitch       = 0;
            ItalicAngle        = 0;
            UnderlinePosition  = -100;
            UnderlineThickness = 50;
            PaintType          = 0;
            CharstringType     = 2;
            FontMatrix         = new CFFArray(
                new double[] { 0.001, 0, 0, 0.001, 0, 0 }
                );
            UniqueID = DefaultSID;
            FontBBox = new CFFArray(
                new double[] { 0, 0, 0, 0 }
                );
            StrokeWidth = 0;
            XUID        = new CFFArray();
            charset     = 0;
            Encoding    = 0;
            CharStrings = 0;
            Private     = new CFFArray(
                new double[] { 0, 0 }
                );
            SyntheticBase   = 0;
            PostScript      = DefaultSID;
            BaseFontName    = DefaultSID;
            BaseFontBlend   = new CFFArray();
            ROS             = new CFFROS();
            CIDFontVersion  = 0;
            CIDFontRevision = 0;
            CIDFontType     = 0;
            CIDCount        = 8720;
            UIDBase         = 0;
            FDArray         = 0;
            FDSelect        = 0;
            FontName        = DefaultSID;
        }
Exemple #3
0
        protected void SetValue(List <double> list, byte key0, byte key1)
        {
            switch (key0)
            {
            case 6:
                BlueValues = CFFArray.Create(list);
                break;

            case 7:
                OtherBlues = CFFArray.Create(list);
                break;

            case 8:
                FamilyBlues = CFFArray.Create(list);
                break;

            case 9:
                FamilyOtherBlues = CFFArray.Create(list);
                break;

            case 10:
                StdHW = list[0];
                break;

            case 11:
                StdVW = list[0];
                break;

            case 12:
                SetValue12(list, key1);
                break;

            case 19:
                Subrs = list[0];
                break;

            case 20:
                defaultWidthX = list[0];
                break;

            case 21:
                nominalWidthX = list[0];
                break;
            }
        }
Exemple #4
0
        protected void SetValue12(List <double> list, byte key1)
        {
            switch (key1)
            {
            case 9:
                BlueScale = list[0];
                break;

            case 10:
                BlueShift = list[0];
                break;

            case 11:
                BlueFuzz = list[0];
                break;

            case 12:
                StemSnapH = CFFArray.Create(list);
                break;

            case 13:
                StemSnapV = CFFArray.Create(list);
                break;

            case 14:
                ForceBold = (int)list[0];
                break;

            case 17:
                LanguageGroup = list[0];
                break;

            case 18:
                ExpansionFactor = list[0];
                break;

            case 19:
                initialRandomSeed = list[0];
                break;
            }
        }
Exemple #5
0
 public CFFPrivateDict()
 {
     BlueValues        = new CFFArray();
     OtherBlues        = new CFFArray();
     FamilyBlues       = new CFFArray();
     FamilyOtherBlues  = new CFFArray();
     BlueScale         = 0.039625;
     BlueShift         = 7;
     BlueFuzz          = 1;
     StdHW             = 0;
     StdVW             = 0;
     StemSnapH         = new CFFArray();
     StemSnapV         = new CFFArray();
     ForceBold         = 0;
     LanguageGroup     = 0;
     ExpansionFactor   = 0.06;
     initialRandomSeed = 0;
     Subrs             = 0;
     defaultWidthX     = 0;
     nominalWidthX     = 0;
 }
        protected void SetValue12(List <double> list, byte key1)
        {
            switch (key1)
            {
            case 0:
                Copyright = (ushort)list[0];
                break;

            case 1:
                isFixedPitch = (int)list[0];
                break;

            case 2:
                ItalicAngle = list[0];
                break;

            case 3:
                UnderlinePosition = list[0];
                break;

            case 4:
                UnderlineThickness = list[0];
                break;

            case 5:
                PaintType = list[0];
                break;

            case 6:
                CharstringType = list[0];
                break;

            case 7:
                FontMatrix = CFFArray.Create(list);
                break;

            case 8:
                StrokeWidth = (int)list[0];
                break;

            case 20:
                SyntheticBase = (int)list[0];
                break;

            case 21:
                PostScript = (ushort)list[0];
                break;

            case 22:
                BaseFontName = (ushort)list[0];
                break;

            case 23:
                BaseFontBlend = CFFArray.Create(list);
                break;

            case 30:
                ROS = CFFROS.Create(list);
                break;

            case 31:
                CIDFontVersion = list[0];
                break;

            case 32:
                CIDFontRevision = list[0];
                break;

            case 33:
                CIDFontType = list[0];
                break;

            case 34:
                CIDCount = list[0];
                break;

            case 35:
                UIDBase = list[0];
                break;

            case 36:
                FDArray = list[0];
                break;

            case 37:
                FDSelect = (int)list[0];
                break;

            case 38:
                FontName = (ushort)list[0];
                break;
            }
        }