My project needs the Ghostscript to do lots of tasks, so I have added the gs CLI tool into my project resource. However when I tried to notarize the project application, Xcode shows me this:
I assume that might because the ghostscript portable CLI is a 3rd-party program from the internet and which doesn't have a codesign, also it has not been enabled the hardened runtime. On the latest MacOS Mojave I have to notarize applications to avoid the gatekeeper …
我使用GDI DrawString
方法绘制文本。程序运行时,屏幕上的文本看起来非常好,但是一旦将文件保存到图像中,字体将比以前更粗体。普通将为粗体,粗体将为粗体。该如何处理?
public override void DrawTo(Graphics g, int x, int y, int flag)
{
if (flag == 1)
{
Pen dpen = new Pen(Color.FromArgb(128, 0, 0, 0), 1);
dpen.DashStyle = System.Drawing.Drawing2D.DashStyle.DashDot;
g.DrawRectangle(dpen, new Rectangle(Bounds.X + x, Bounds.Y + y, Bounds.Width, Bounds.Height));
}
if (!string.IsNullOrEmpty(Text))
{
g.DrawString(Text, Font, new SolidBrush(Color), new Rectangle(Bounds.X + x, Bounds.Y + y, Bounds.Width, Bounds.Height));
}
}
Run Code Online (Sandbox Code Playgroud)