Enabling ClearType on Windows CE 6.0

时间:2022-08-11 17:36:04

I’m working on some code to get an old Digital Picture Frame up and running (Kurt found the hardware in the lab) – The frame doesn’t have any input so we decided to use Telnet as the interface to configure the picture feed (I’m using the Windows Live FrameIt feed http://frameit.live.com), the Internet Proxy (since we’re using the frame behind the corporate firewall), and the picture interval timeout.

Since we’re using Telnet we need to know the IP address of the frame – Getting the IP address is fairly straight forward (there’s plenty of useful source code that ships with the CE 6 product, including IPConfig (C:/WINCE600/PUBLIC/COMMON/OAK/DRIVERS/NETSAMP/IPCONFIG), Internet Explorer Control Panel applet (so you can set the internet proxy) – (C:/WINCE600/PUBLIC/IE/OAK/INETCPL/options.cpp)

While I’m waiting for the user to set the proxy (optional), and the feedname (I could bake a default feed into the image) I display the IP address of the frame on the display.

Here’s how part of the IP address looks – notice how “jagged” the characters look? (look at the steps down the “7”)

Enabling ClearType on Windows CE 6.0

Here’s an enlarged version of the same image…

Enabling ClearType on Windows CE 6.0

Yuk! – Now that really looks bad…

How do we make this look better? – simple, enable Clear Type on the o/s image.

Enabling Clear Type is amazingly simple… Add the following registry key to your o/s image…

   1: [HKEY_LOCAL_MACHINE/SYSTEM/GDI/Cleartype]
   2: "Default"=dword:00000001  

Now let’s take a look at the same text being displayed on the frame with Clear Type enabled.

Here’s the small image (actual size, 36 point Verdana), notice how lovely and smooth the leg of the “7” looks… Ah!, much better…

Enabling ClearType on Windows CE 6.0

Here’s the enlarged version…

Enabling ClearType on Windows CE 6.0

I’ve started creating dummy components for things like enabling Clear Type, the dummy component doesn’t contain any source, but does contain the registry key needed to enable the setting – It might be useful for me to create a quick 5 minute “How To” video that explains how this works…