.net - 不受 ClearType 全局设置影响的 WinForm 应用程序

标签 .net winforms fonts gdi+ cleartype

我有一个主窗体 (WinForm),它应该在没有 ClearType 的情况下呈现其内容。更准确地说,该表单中的 RichTextBox 应该在没有 ClearType 的情况下呈现其文本。在最终用户系统上打开 ClearType 时,如何防止它影响我的应用程序?

我还没有找到如何使用 System.Drawing 来实现这一点,我也不知道 P/Invoke 解决方案。

最佳答案

我不知道如何设置它,但你可以从

  int x = System.Windows.Forms.SystemInformation.FontSmoothingType; 
//x=1 when SmoothingType is Standard
//x=2 when SmoothingType is ClearType

关于.net - 不受 ClearType 全局设置影响的 WinForm 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4130340/

相关文章:

c# - 从 C# 代码打开 TortoiseSVN RepoBrowser

vba - 微软Word : Change Font of Characters Missing In Default Font

css - 在不同的页面中具有不同的字体粗细/类型

css - Google 字体无法在 Google Chrome 中正确显示

c# - 在注册表中查找应用程序路径

c# - 为什么我要在 MSBuild 可用时继续使用 Nant?

c# - 完成选择项目时的事件?

c# - 如何从 C# 代码将默认打印 'zoom > scale to paper size' 设置为 A4?

jquery - 如何在 Kendo UI TreeList 中动态更改列标题?

.net - F# 将构造函数添加到记录?