使TChromium渲染消除锯齿

时间:2011-12-23 13:52:58

标签: delphi delphi-xe antialiasing chromium tchromium

我使用最新的Chromium Embedded Framework的TChromium Delphi包装器(http://code.google.com/p/delphichromiumembedded/)。

字体不会显示消除锯齿。

如何切换此行为?

我试过这个适用于Chrome的黑客,但不适用于嵌入在Delphi应用程序中的TChromium

/* hack for anti-alising in Chrome
   url : https://github.com/h5bp/html5-boilerplate/issues/598
   url : http://bashelton.com/2011/03/force-font-smoothing-in-chrome-on-windows-hack/
*/
.body {
-webkit-text-stroke: 1px transparent;
text-shadow: 0px 0px 1px #D4D0C8;
}

我的.manifest文件是:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <assemblyIdentity
        version="1.0.0.0"
        processorArchitecture="X86"
        name="Company.Application.1.0"
        type="win32"
    />
    <description>MTG Studio</description>
    <dependency>
        <dependentAssembly>
            <assemblyIdentity
                type="win32"
                name="Microsoft.Windows.Common-Controls"
                version="6.0.0.0"
                processorArchitecture="X86"
                publicKeyToken="6595b64144ccf1df"
                language="*"
            />
        </dependentAssembly>
    </dependency>
    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
        <security>
            <requestedPrivileges>
                <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
            </requestedPrivileges>
        </security>
    </trustInfo>
</assembly>

1 个答案:

答案 0 :(得分:3)

显然,这显然不是Chrome问题。 Chrome行为正常,在Windows上它尊重系统|控制面板|显示|外观|效果| “使用以下方法平滑屏幕字体的边缘”。

在我切换到Clear Type(并重新启动我的应用程序)后,它立即变为别名:

Before and After ClearType being switched on

要查看未伸展的图像,请右键单击该图像,然后在新的浏览器窗口中将其打开。

该建议来自https://superuser.com/questions/308135/how-can-i-improve-font-appearance-in-google-chrome

相关问题