예제 #1
0
        /// <summary>
        /// After the font has been loaded, (with the <see cref="FilePath"/>, <see cref="GlyphHeight"/>, and <see cref="GlyphWidth"/> fields filled out) this method will create the actual texture.
        /// </summary>
        public void Generate()
        {
#if SFML
            Image = new Texture2D(FilePath);
#elif MONOGAME
            using (System.IO.Stream fontStream = System.IO.File.OpenRead(FilePath))
                Image = Texture2D.FromStream(Engine.Device, fontStream);
#endif
            ConfigureRects();
        }