views:

1577

answers:

7

I am having a hard time to find out which font is used by the Win 7 File Explorer in the tree view on the left hand side. Better, of course, would be if I can programmatically find out which the right font is (C#).

I searched the Windows 7 design guidelines but this particular scenario is not listed (at least I couldn't find it).

So anyone good with fonts?

+2  A: 
Robert Harvey
+2  A: 

It's Segoe UI. In the future, you can use WhatTheFont to resolve any questions you have about what font something is.

Anthony Mills
Thanks for the link, I will try that one...
Stefan Koell
Nice link. I'm sure it will come in handy.
Callum Rogers
+2  A: 

P/Invoke to SystemParametersInfo with SPI_GETICONTITLELOGFONT.

It depends on the language version of Windows. If you look at Robert Harvey's answer, you'll see a character that can't be displayed by Segoe UI.

Windows programmer
+1  A: 

It is not Segoe. I've spent the last three days attempting to reverse engineer Windows Explorer in Windows 7. Having worked with WPF and Vista, Segoe UI was my first choice for a font family, but I can confirm that it doesn't match up exactly with what Windows Explorer is using.

DRAirey1
glad to hear that I am not alone (and not insane). If you find out more about the font, let us know...
Stefan Koell
+1  A: 

I took the liberty of capturing Windows Explorer with PAINT.NET (a great utility) and wrote the identical text above the captured text. Here's what I can tell you. The Font in Windows Explorer appears to be some compressed form of Seqoe UI. There's simply no other font that's close enough. However, it become apparent when you have a long word or phrase that the width has been compressed and the pixels bleed (aliasing). I've not yet found out how to reproduce the exact spacing, but I'm pretty convinced of the following:

  1. The font used by Windows Explorer is Segoe UI.
  2. The point size is most likely 9.
  3. The font is definitely compressed from what you would get using Seqoe UI 9.0.
DRAirey1
On my en-us Windows 7, if I set Notepad to use Segoe UI Regular, 9 pt, I get the exact same text as Windows Explorer. If I use the same font in Word 2007, the spacing between words is slightly different.
Edward Brey
A: 

After working on this subject for several months, here's what I've concluded: The default font is in fact Segoe UI, 9 pt. (12 pixels). However, there is something going on with the 'SnapsToDevicePixels' in Win32 that isn't or can't be emulated with WPF. If you start to mess with the boundaries of your text in fractions, you can start to see some of the aliasing that goes on with fonts. For example, place a simple canvas in front of your text block and give it a width of, say, 7.5 and you'll see your text start to 'bleed' into the surrounding pixels. I've played around with every combination of fractional spacing and fractional fonts and still can't exactly reproduce the text we see with Windows Explorer. This leaves me with the conclusion that Win32 text is simply rendered with a different engine than WPF.

DRAirey1
A: 

From the Typography in WPF topic, have you tried the Font Stretch property?

Robert Paulson