Example #1
0
        public void ShouldNormalize()
        {
            using (var typeface = SKTypeface.FromFile(Path.Combine(PathToFonts, "content-font.ttf")))
                using (var blob = typeface.OpenStream(out var index).ToHarfBuzzBlob())
                    using (var face = new Face(blob, index))
                        using (var font = new Font(face))
                            using (var buffer = new Buffer())
                            {
                                buffer.AddUtf16("Â̶");

                                font.Shape(buffer);

                                buffer.NormalizeGlyphs();

                                Assert.Equal(1027, buffer.GlyphPositions[1].YOffset);
                            }
        }