小编Sup*_*rry的帖子

How to codesign and enable the hardened runtime for a 3rd-party CLI on Xcode?

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 …

macos xcode objective-c codesign osx-gatekeeper

6
推荐指数
1
解决办法
3213
查看次数

C#上的DrawString文本太粗体

我使用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)

c# gdi+ image drawstring

3
推荐指数
1
解决办法
1375
查看次数

标签 统计

c# ×1

codesign ×1

drawstring ×1

gdi+ ×1

image ×1

macos ×1

objective-c ×1

osx-gatekeeper ×1

xcode ×1