示例#1
0
文件: Demo.cs 项目: rds1983/NvgSharp
        private static int LoadFont(NvgContext vg, string name, string path)
        {
            byte[] data;
            var    ms = new MemoryStream();

            using (var stream = TitleContainer.OpenStream(path))
            {
                stream.CopyTo(ms);

                data = ms.ToArray();
            }

            return(vg.CreateFontMem(name, data));
        }