Ejemplo n.º 1
0
        public void ShouldSetHorizontalGlyphAdvancesDelegate()
        {
            using (var font = new Font(Font))
                using (var fontFuncs = new FontFunctions())
                {
                    fontFuncs.SetHorizontalGlyphAdvancesDelegate((f, fd, c, g, a) =>
                    {
                        a[0] = 1337;
                    });

                    fontFuncs.MakeImmutable();

                    font.SetFontFunctions(fontFuncs, "FontData");

                    var advance = font.GetHorizontalGlyphAdvance(49u);

                    Assert.Equal(1337, advance);
                }
        }