The 2008 Winter Scripting Games

Beginner Event 2: True Type

Important: The deadline for this event has passed. Solutions are available in VBScript, Windows PowerShell, and Perl.

In the True Type event competitors are asked to read a series of keys from the Microsoft Windows system registry.

Not a native speaker of English? These event instructions are also available in the following languages: Chinese (Simplified); Chinese (Traditional); French; German; Japanese; Portuguese Brazilian; Russian; and Spanish. For more information, and to access these localized instructions, see the Scripting Games International page.

*
On This Page
About This EventAbout This Event
Event ScenarioEvent Scenario

About This Event

Division

Beginner

Deadline

Wednesday, February 20, 2008 (8:00 AM PST)

Points Awarded

10

Top of pageTop of page

Event Scenario

Before you get started on this event remember: playing with the registry can be hazardous to your system health. So what’s this event all about? Playing with the registry. But don’t worry, you won’t be asked to write anything to the registry, you simply need to read some values. This won’t change your system at all or mess up anything – assuming, of course, you follow the instructions for this event correctly.

In this event we’re interested in finding out which fonts are installed on a computer. We’ll give you a hint: the fonts are stored in the registry under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion. But we don’t want just any fonts; we want only the TrueType fonts. How can you tell a TrueType font from a non-TrueType font? That’s easy: in the registry, TrueType fonts will include the phrase TrueType in parentheses immediately following the font name. In other words, a TrueType font will look like this:

Bauhaus 93 (TrueType)

To successfully complete this event, your script must display the following output:

The names of all the TrueType fonts on the computer.

The number of TrueType fonts on the computer.

The total number of fonts on the computer.

Your output should look something like this:

Lucida Bright (TrueType)
Lucida Bright Demibold (TrueType)
Lucida Bright Demibold Italic (TrueType)
Lucida Bright Italic (TrueType)
Lucida Calligraphy Italic (TrueType)
Lucida Fax Regular (TrueType)

TrueType: 419
Total: 451

Top of pageTop of page