Exemplo n.º 1
0
        public IFont LoadFontDirect(string fullFilePath)
        {
            global::SFML.Graphics.Font sfFont;

            //try {
            sfFont = new global::SFML.Graphics.Font(fullFilePath);
            Font font = new Font(sfFont);

            return font;
        }
Exemplo n.º 2
0
        public IFont LoadFont(byte[] data)
        {
            // Note: This memory stream needs to be kept open for the font to be usable in SFML...
            MemoryStream stream = new MemoryStream();
            stream.Write(data, 0, data.Length);

            global::SFML.Graphics.Font sfFont;

            sfFont = new global::SFML.Graphics.Font(stream);

            Font font = new Font(sfFont);

            return font;
        }