Quote:
_renderer = new Renderer(this, 6500);
_renderer.MapBuffer();
var fontMap = new FontMap(_renderer, new Size(512, 512));
fontMap.AddGlyphSet(FontMap.BasicLatin, "Times New Roman", 10, Style.Normal, Weight.Normal, Underline.None);
fontMap.AddGlyphSet(FontMap.BasicLatin, "Times New Roman", 16, Style.Normal, Weight.Normal, Underline.None);
fontMap.GenerateFontMap();
// Renderer, FontMap, MaxWidth, MaxHeight, FontName, FontSize, FontStyle, FontWeight, FontUnderline, PosX|Y|Z
_block = new Block(_renderer, fontMap, 790, 600, "Times New Roman", 16, Style.Normal, Weight.Normal, Underline.None, 0, 0, 0);
_block.SetText(Text, Block.Alignment.Center);
So, basically the fontmap uses Pango to paint all the glyphs that you need (e.g., FontMap.BasicLatin) into a dynamically managed buffer.
Quote:
glyphInfo = _fontMap.GetGlyph(Character, FontName, Size, Style, Weight, Underline);
The glyphInfo contains everything you need to successfully render a single glyph (e.g., position on the texture, index of the texture, bearingX|Y, advanceX|Y, etc).