Ejemplo n.º 1
0
        public static CFFTopDict Read(BinaryReaderFont reader, int length)
        {
            CFFTopDict    value = new CFFTopDict();
            long          start = reader.Position;
            List <double> list  = new List <double>();
            byte          key0  = 0;
            byte          key1  = 0;

            while ((reader.Position - start) < length)
            {
                byte n = reader.PeekByte();
                if (n <= 21)
                {
                    key0 = reader.ReadByte();
                    if (key0 == 12)
                    {
                        key1 = reader.ReadByte();
                    }
                    //Console.WriteLine("key0: " + key0);
                    //if (key1 != 0) {
                    //	Console.WriteLine("key1: " + key1);
                    //}
                    value.SetValue(list, key0, key1);
                    key1 = 0;
                    list.Clear();
                }
                else
                {
                    list.Add(reader.ReadCFFNumber());
                }
            }
            return(value);
        }
Ejemplo n.º 2
0
        public static CFFFDSelect Read(BinaryReaderFont reader)
        {
            CFFFDSelect fdSelect = null;
            byte        format   = reader.PeekByte();

            switch (format)
            {
            case 0:
                fdSelect = CFFFDSelect0.Read(reader);
                break;

            case 3:
                fdSelect = CFFFDSelect3.Read(reader);
                break;
            }
            return(fdSelect);
        }
Ejemplo n.º 3
0
        public static CFFCharset Read(BinaryReaderFont reader, int count)
        {
            CFFCharset charset = null;
            byte       format  = reader.PeekByte();

            switch (format)
            {
            case 0:
                charset = CFFCharset0.Read(reader);
                break;

            case 1:
                charset = CFFCharset1.Read(reader, count);
                break;

            case 2:
                charset = CFFCharset2.Read(reader, count);
                break;
            }
            return(charset);
        }