Question

I use the latest TChromium Delphi wrapper of Chromium Embedded Framework from (http://code.google.com/p/delphichromiumembedded/).

The fonts does not get displayed anti-aliased.

How I can switch this behaviour on?

I tried with this hack which works for Chrome but not for TChromium embedded in a Delphi application

/* 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;
}

My .manifest file is:

<?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>
Was it helpful?

Solution

Apparently it became obvious that this is not really a Chrome issue. Chrome behaves properly and on Windows it respects System|Control Panel|Display|Appearance|Effect| "Use the following method to smooth edges of screen fonts".

Immediately after I switched to Clear Type (and restarted my app) it all became aliased:

Before and After ClearType being switched on

To see the image not stretched right hand click over it and open it in a new browser window.

The suggestion came from https://superuser.com/questions/308135/how-can-i-improve-font-appearance-in-google-chrome

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top