开发者

What font and size is used in Windows 7 File Explorer Tree

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 开发者_StackOverflowis not listed (at least I couldn't find it).

So anyone good with fonts?


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


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.


Actually it's probably Segoe UI.

If you right-click on the desktop and select Personalize from the menu that pops up, you should find a place in there that will tell you what the default window content font is.

http://www.sevenforums.com/tutorials/1175-fonts-change.html


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.


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.


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.


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


That font is Tahoma 7,7pt - checked pixel-in-pixel in Photoshop, in Windows Server 2008.


Windows7 Aero or Windows7 Basic themes use Sagoe.
Windows7 "Windows Classic" theme uses Tahoma.


The font is indeed Segoe UI, 9 pt. However, the Graphics.DrawString() and TextRenderer.DrawText() methods render the font a little differently. If you use Graphics.DrawString(), the text will appear to have more kerning than Windows uses. TextRenderer.DrawText() appears to mimic the exact font that FileExplorer uses.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜