Windows 7 文件资源管理器树中使用什么字体和大小
我很难在左侧的树视图中找出 Win 7 文件资源管理器使用哪种字体。当然,如果我能够以编程方式找出正确的字体(C#),那就更好了。
我搜索了Windows 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(10)
实际上它可能是
Segoe UI
。如果右键单击桌面并从弹出的菜单中选择“个性化”,您应该会在其中找到一个位置,告诉您默认的窗口内容字体是什么。
http://www.sevenforums.com/tutorials/1175-fonts-change。 html
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
我擅自使用 PAINT.NET(一个很棒的实用程序)捕获 Windows 资源管理器,并在捕获的文本上方写入相同的文本。这是我可以告诉你的。 Windows 资源管理器中的字体似乎是 Seqoe UI 的某种压缩形式。根本没有其他字体足够接近。然而,当您有一个很长的单词或短语时,宽度会被压缩并且像素会渗色(锯齿),这一点就会变得很明显。我还没有找到如何重现精确的间距,但我非常确信以下几点:
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:
这不是塞戈。在过去的三天里,我一直在尝试对 Windows 7 中的 Windows 资源管理器进行逆向工程。在使用过 WPF 和 Vista 后,Segoe UI 是我字体系列的首选,但我可以确认它与正在使用 Windows 资源管理器。
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.
在研究这个主题几个月后,我得出以下结论:默认字体实际上是 Segoe UI,9 pt。 (12 像素)。然而,Win32 中的“SnapsToDevicePixels”发生了一些无法用 WPF 模拟的情况。如果您开始弄乱分数文本的边界,您可能会开始看到字体出现的一些锯齿现象。例如,在文本块前面放置一个简单的画布,并将其宽度设置为 7.5,您将看到文本开始“渗入”周围的像素。我已经尝试过小数间距和小数字体的每种组合,但仍然无法准确地重现我们在 Windows 资源管理器中看到的文本。这让我得出这样的结论:Win32 文本只是使用与 WPF 不同的引擎呈现的。
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.
从 WPF 中的版式 主题中,您是否尝试过 字体拉伸属性?
From the Typography in WPF topic, have you tried the Font Stretch property?
该字体是 Tahoma 7,7pt - 在 Windows Server 2008 中的 Photoshop 中逐像素检查。
That font is Tahoma 7,7pt - checked pixel-in-pixel in Photoshop, in Windows Server 2008.
Windows7 Aero 或 Windows7 Basic 主题使用 Sagoe。
Windows7“Windows Classic”主题使用Tahoma。
Windows7 Aero or Windows7 Basic themes use Sagoe.
Windows7 "Windows Classic" theme uses Tahoma.
字体确实是 Segoe UI,9 pt。但是,
Graphics.DrawString()
和TextRenderer.DrawText()
方法呈现的字体略有不同。如果您使用Graphics.DrawString()
,文本的字距调整将比 Windows 使用的字距调整更多。TextRenderer.DrawText()
似乎模仿了 FileExplorer 使用的确切字体。The font is indeed Segoe UI, 9 pt. However, the
Graphics.DrawString()
andTextRenderer.DrawText()
methods render the font a little differently. If you useGraphics.DrawString()
, the text will appear to have more kerning than Windows uses.TextRenderer.DrawText()
appears to mimic the exact font that FileExplorer uses.这是 Segoe 用户界面。将来,您可以使用 WhatTheFont 来解决有关字体是什么的任何问题。
It's Segoe UI. In the future, you can use WhatTheFont to resolve any questions you have about what font something is.
使用 SPI_GETICONTITLELOGFONT P/调用 SystemParametersInfo。
这取决于 Windows 的语言版本。如果您查看 Robert Harvey 的答案,您会看到 Segoe UI 无法显示的字符。
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.