2011-12-23 129 views
3

我使用來自(http://code.google.com/p/delphichromiumembedded/)的Chromium嵌入框架的最新TChromium Delphi封裝。使TChromium呈現反鋸齒

字體不顯示消除鋸齒。

我該如何切換此行爲?

我試着與這個黑客它適用於Chrome,但不是TChromium嵌入在Delphi應用程序

/* 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> 
+0

這可能是因爲你正在運行的Chromium應用。您的Delphi應用程序中是否啓用了主題支持?您正在使用遠程桌面或終端服務嗎?你使用的是哪個版本的Windows? – 2011-12-23 14:05:41

+0

未啓用主題。我有一個XP Manifest。沒有RDP或終端服務。 Windows XP SP3。 – 2011-12-23 14:12:42

+0

pduerden:我爲此做了一些研發。沒有銀彈子修復。原始黑客在Chrome v14中停止工作,文本陰影破解根據字體,大小和顏色而有不同的結果。並不是說它無法使用,但的一刀切的攻擊是有點打擊和錯過。 http://jsfiddle.net/peterduerden/BZj29/ – 2012-02-27 22:47:25

回答

3

顯然很明顯,這不是真的是Chrome的問題。 Chrome的行爲正常,在Windows系統中|控制面板|顯示|外觀|效果| 「使用以下方法平滑屏幕字體的邊緣」。

緊接着我切換到透明型(並重新啓動我的應用程序),它都成了別名:

Before and After ClearType being switched on

要看到圖像不拉伸右手點擊它,並在新的瀏覽器窗口中打開。

的建議來自https://superuser.com/questions/308135/how-can-i-improve-font-appearance-in-google-chrome