Exemple #1
0
        /// <summary>
        /// Create a <see cref="PixelGlyphMap"/> for the given system font. Includes Unicode latin characters.
        /// </summary>
        /// <param name="fontStream">Stream of the font data.</param>
        /// <param name="size">Size to render the font at.</param>
        /// <param name="glyphMap">The glyph map of the font atlas.</param>
        /// <param name="image">The image of the font atlas.</param>
        public static void CreateFont(Stream fontStream, float size, out PixelGlyphMap glyphMap, out Image <Rgba32> image)
        {
            var ranges = TextUtil.CreateRanges(TextUtil.LatinStart, TextUtil.LatinEnd);

            CreateFont(fontStream, size, ranges, out glyphMap, out image);
        }
Exemple #2
0
        /// <summary>
        /// Create a <see cref="PixelGlyphMap"/> for the given system font. Includes Unicode latin characters.
        /// </summary>
        /// <param name="name">Name of the system font.</param>
        /// <param name="size">Size to render the font at.</param>
        /// <param name="glyphMap">The glyph map of the font atlas.</param>
        /// <param name="image">The image of the font atlas.</param>
        public static void CreateSystemFont(string name, float size, out PixelGlyphMap glyphMap, out Image <Rgba32> image)
        {
            var ranges = TextUtil.CreateRanges(TextUtil.LatinStart, TextUtil.LatinEnd);

            CreateSystemFont(name, size, ranges, out glyphMap, out image);
        }