Exemplo n.º 1
0
        public FFTFont(IList <byte> bytes, IList <byte> widthBytes)
        {
            GlyphWidths = new FFTFontWidths(this);
            Glyphs      = new Glyph[2200];
            for (int i = 0; i < 2200; i++)
            {
                Glyphs[i] = new Glyph(widthBytes[i], bytes.Sub(i * 35, (i + 1) * 35 - 1));
            }

#if DEBUG
            using (System.Drawing.Bitmap b = new System.Drawing.Bitmap(550, 560))
            {
                for (int i = 0; i < 2200; i++)
                {
                    DrawGlyphOnBitmap(b, Glyphs[i], new System.Drawing.Point(10 * (i % 55), 14 * (i / 55)));
                }
                b.Save("font.png", System.Drawing.Imaging.ImageFormat.Png);
            }
#endif
        }
Exemplo n.º 2
0
        public FFTFont( IList<byte> bytes, IList<byte> widthBytes )
        {
            GlyphWidths = new FFTFontWidths( this );
            Glyphs = new Glyph[2200];
            for( int i = 0; i < 2200; i++ )
            {
                Glyphs[i] = new Glyph( i, widthBytes[i], bytes.Sub( i * 35, (i + 1) * 35 - 1 ) );
            }

            #if DEBUG
            using ( System.Drawing.Bitmap b = new System.Drawing.Bitmap( 550, 560 ) )
            {
                for ( int i = 0; i < 2200; i++ )
                {
                    DrawGlyphOnBitmap( b, Glyphs[i], new System.Drawing.Point( 10 * ( i % 55 ), 14 * ( i / 55 ) ) );
                }
                b.Save( "font.png", System.Drawing.Imaging.ImageFormat.Png );
            }
            #endif
        }