I currently need to convert Datamax's DPL commands to create previews. Currently, it seems that there is no java or C# library that can convert DPL commands into images, so I am trying to express it by drawing it with Graphics. (What I do on the website is limited and must be implemented in my source.) However, when I try to draw with graphics, only the left and right widths of characters can be adjusted in the DPL command, but in C# or Java, it is adjusted by the font size, so it is reduced in proportion. Any advice on this?
and I tried
private void button1_Click(object sender, EventArgs e)
{
Graphics g = panel1.CreateGraphics();
g.Clear(this.BackColor);
string measureString = "Measure String";
Font stringFont = new Font("Arial", 10);
SizeF stringSize = new SizeF();
stringSize = g.MeasureString(measureString, stringFont);
g.DrawString(measureString, stringFont, Brushes.Black, new PointF(0, 0));
}