C# 将文本添加到图元文件时,字母字体会发生更改

C# 将文本添加到图元文件时,字母字体会发生更改,c#,graphics,drawstring,metafile,C#,Graphics,Drawstring,Metafile,我想向元文件添加一些文本。 我使用的代码是: Metafile m = new Metafile("1.emf"); Graphics grfxVideo = CreateGraphics(); IntPtr ipHdc = grfxVideo.GetHdc(); Metafile mf = new Metafile("2.emf", ipHdc); grfxVideo.ReleaseHdc(ipHdc); grfxVideo.Dispose(); Graphics grfxMetafile =

我想向元文件添加一些文本。 我使用的代码是:

Metafile m = new Metafile("1.emf");
Graphics grfxVideo = CreateGraphics();
IntPtr ipHdc = grfxVideo.GetHdc();
Metafile mf = new Metafile("2.emf", ipHdc);
grfxVideo.ReleaseHdc(ipHdc);
grfxVideo.Dispose();
Graphics grfxMetafile = Graphics.FromImage(mf);
grfxMetafile.DrawImage(m, 0, 0);
grfxMetafile.DrawString("test",SystemFonts.DefaultFont,SystemBrushes.Desktop,new PointF(0,0));
grfxMetafile.Dispose();
mf.Dispose();
m.Dispose();
新图元文件2.emf中的字母比原始emf文件更粗体。 此外,新图元文件的大小至少是原始图元文件的两倍。 我做错了什么


编辑:原始emf文件1.emf是从emf spool文件创建的,文本位于ExtTextOut和ExtTextOutA记录中。

观察到非常相似的行为,这些行为破坏了我尝试使用元文件在应用程序中缓存复杂图形的行为。观察到非常相似的行为,这些行为破坏了我尝试使用元文件的行为用于在我的应用程序中缓存复杂图形的图元文件。