Showing posts with label windows xp. Show all posts
Showing posts with label windows xp. Show all posts

2009-11-22

Windows Console and True Type Fonts

In a previous article (Pimpin' Windows XP's cmd.exe) I've presented a way to change the font for the Windows Console - hacking a font and name it Lucida Console.

The above method is a hack, since Microsoft has presented with a dialog to change the font, surely they've thought on a method to add new true type fonts, and it turns out that they did.

The console font configuration is done by the means of Registry, the following registry key is responsible for that:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Console\TrueTypeFont

There you will find "Lucida Console" as number "0", if you will add the value "1" as "DejaVu Sans Mono" nothing will happen, you need to add the second font as "00", third as "000" and so on.

Microsoft has a KB on how to add a font to the console. A button in the
Windows Console property pages would have been far more useful than a KB page.

Here is a screenshot showing "DejaVu Sans Mono" in the console font property page:

2008-06-22

Windows XP Manifest File Maker

Windows XP has introduced a new theming API. You can make your applications to use this new theming API by the use of a .manifest file. This manifest file can sit alongside your application or in your applications resource part.

Here is a batch file which creates such a manifest file:

@echo off

rem (c) 2008 Cristian Adam

if [%1] == [] (

echo Usage: make_manifest file.exe

) else (

if exist %1.manifest goto :EOF

echo ^<?xml version="1.0" encoding="UTF-8" standalone="yes" ?^> >> %1.manifest
echo ^<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"^> >> %1.manifest
echo ^<description^>Windows Forms Common Control manifest^</description^> >> %1.manifest
echo ^<dependency^> >> %1.manifest
echo ^<dependentAssembly^> >> %1.manifest
echo ^<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*" /^> >> %1.manifest
echo ^</dependentAssembly^> >> %1.manifest
echo ^</dependency^> >> %1.manifest
echo ^</assembly^> >> %1.manifest

)


And now a screenshot to show the before and after state:

2008-04-29

Pimpin' Windows XP's cmd.exe

I like the command line interface, not because I own a Das Keyboard and I'm forced to look at the screen, but because I like to type.

Windows XP's cmd.exe was not one of my favorite consoles, it lacked configurability, especially in the font area. You have only two options when it comes fonts: raster fonts and "Lucida Console".

I grew accustomed with "DejaVu Sans Mono" font from my Linux days and since then when I think about a monospaced font I think of "DejaVu Sans Mono".

One option is to use an alternative console, but I found out that it's not as fast as cmd.exe.

The solution is to replace "Lucida Console" with "DejaVu Sans Mono"! Just fire you your favourite font editor and do the required changes, then install the new "Lucida Console" and that's it.

Here is a screenshot with my pimped cmd.exe



In the meantime I've found an easier way of changing the console font, read more about it here