Exemplo n.º 1
0
        public void ShouldSetVariationGlyphDelegate()
        {
            using (var font = new Font(Font))
                using (var fontFuncs = new FontFunctions())
                {
                    fontFuncs.SetVariationGlyphDelegate((Font _, object __, uint u, uint v, out uint g) =>
                    {
                        g = 1337;
                        return(true);
                    });

                    fontFuncs.MakeImmutable();

                    font.SetFontFunctions(fontFuncs, "FontData");

                    var result = font.TryGetVariationGlyph(49, 0, out var glyph);

                    Assert.True(result);
                    Assert.Equal(1337u, glyph);
                }
        }