var fontFamily = fontCollection.Get("Inter Variable");
var font = fontFamily.CreateFont(96, FontStyle.Regular);
var img = new Image<Rgba32>(1960, 180, Rgba32.ParseHex("#FF0000FF"));
img.Mutate(g => {
var textFont = font;
var paths = TextBuilder.GenerateGlyphs("Inter variable", new TextOptions(textFont) {
Origin = new Vector2(980, 90),
VerticalAlignment = VerticalAlignment.Center,
HorizontalAlignment = HorizontalAlignment.Center,
TextAlignment = TextAlignment.Center,
Font = textFont
});
g.Fill(Color.Black, paths);
});
img.Save("test.png");
SixLabors.Fonts Version="2.0.1"
SixLabors.ImageSharp Version="3.1.1"
SixLabors.ImageSharp.Drawing Version="2.1.0"
OS: Windows 11 x64
Runtime: .NET 8.0.100
Hi, i'm trying to render text with the https://rsms.me/inter/ font but the result is not correct.
Resulting image
Test environment