3

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>
Gad D Lord
  • 6,130
  • 10
  • 50
  • 98
  • This might be because of the application you're running Chromium from. Do you have Themes support enabled in your Delphi application? Are you using Remote Desktop or Terminal Services? What version of Windows are you using? – Warren P Dec 23 '11 at 14:05
  • No themes enabled. I have an XP Manifest. No RDP or Terminal Services. Windows XP SP3. – Gad D Lord Dec 23 '11 at 14:12
  • pduerden: I did some R&D into this. There is no silver bullet fix. The original hack stopped working in Chrome v14 and the text-shadow hack has variable results depending on font, size and colour. Not that it couldn’t be used but the one-size-fits-all hack for the is a bit hit and miss. http://jsfiddle.net/peterduerden/BZj29/ – Gad D Lord Feb 27 '12 at 22:47

1 Answers1

3

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

Community
  • 1
  • 1
Gad D Lord
  • 6,130
  • 10
  • 50
  • 98