public static Image <Rgba32> RenderImage(RendererOptions font, string text, Rgba32 backColour, Rgba32 textColour) { var builder = new GlyphBuilder(); var renderer = new TextRenderer(builder); var size = TextMeasurer.Measure(text, font); renderer.RenderText(text, font); builder.Paths .SaveImage((int)size.Width, (int)size.Height, out var ret, backColour, textColour); return(ret); }