More on Segoe UI in Windows 8

Note: the following is based on the Windows 8 Release Preview (build 8400) and may not accurately reflect the final version of Windows 8. I’ll update this post if there are changes in future builds.

Updated: The fonts have been updated in the public beta (Windows Consumer Preview) and release candidate (Windows Release Preview) and I’ve changed the tables below to reflect this. I was also made aware of some additional information about changes to Segoe UI, including new stylistic sets and support for ligatures: you can read more at Subacme.

Further to my earlier post about Segoe UI Light in Windows 8, I’ve done some more research into the changes to the Segoe family of fonts. The Fonts class in the .NET Framework was helpful for retrieving information about the fonts.

First off, Segoe Print and Segoe Script and their bold variants have not been modified and are still labelled version 5.02 and 5.00, respectively. All existing variants of Segoe UI have been updated, and there is one new variant: Segoe UI Semilight. The latter is in fact used as the caption and small caption font in Windows 8 – Windows Vista and Windows 7 used Segoe UI (Regular). The Windows Phone 7 platform includes Segoe WP Semilight, and Segoe UI Semilight seems to be a superset of that font.

Apparently new in the Windows 8 Release Preview are three italic variants: Segoe UI Light Italic, Segoe UI Semibold Italic and Segoe UI Semilight Italic.

The following tables summarise the differences in glyph and character counts between the Windows 7 and Windows 8 versions of the Segoe UI font family:

Segoe UI Regular

  Windows 7 Windows 8 Developer Preview Windows 8 Consumer Preview Windows 8 Release Preview
Version 5.01 5.12 5.16 5.24
Glyphs 2899 4281 4490 4516
Characters 2658 3283 3423 3404

Segoe UI Bold

  Windows 7 Windows 8 Developer Preview Windows 8 Consumer Preview Windows 8 Release Preview
Version 5.01 5.12 5.15 5.24
Glyphs 2899 4290 4428 4442
Characters 2658 3283 3421 3401

Segoe UI Italic

  Windows 7 Windows 8 Developer Preview Windows 8 Consumer Preview Windows 8 Release Preview
Version 5.01 5.10 5.15 5.22
Glyphs 2381 2478 2597 3077
Characters 2130 2180 2299 2525

Segoe UI Bold Italic

  Windows 7 Windows 8 Developer Preview Windows 8 Consumer Preview Windows 8 Release Preview
Version 5.01 5.10 5.15 5.22
Glyphs 2381 2478 2597 3077
Characters 2130 2180 2299 2525

Segoe UI Light

  Windows 7 Windows 8 Developer Preview Windows 8 Consumer Preview Windows 8 Release Preview
Version 5.00 5.12 5.15 5.25
Glyphs 2380 4036 4178 4236
Characters 2131 3090 3230 3211

Segoe UI Light Italic

  Windows 8 Release Preview
Version 5.22
Glyphs 3089
Characters 2525

Segoe UI Semibold

  Windows 7 Windows 8 Developer Preview Windows 8 Consumer Preview Windows 8 Release Preview
Version 5.00 5.12 5.16 5.24
Glyphs 2380 4089 4228 4242
Characters 2131 3144 3231 3211

Segoe UI Semibold Italic

  Windows 8 Release Preview
Version 5.22
Glyphs 3089
Characters 2525

Segoe UI Semilight

  Windows 7 Windows 8 Developer Preview Windows 8 Consumer Preview Windows 8 Release Preview
Version N/A 5.12 5.15 5.24
Glyphs N/A 4034 4175 4189
Characters N/A 3090 3230 3210

Segoe UI Semilight Italic

  Windows 8 Release Preview
Version 5.23
Glyphs 3089
Characters 2525

Segoe UI Symbol

  Windows 7 Windows 8 Developer Preview Windows 8 Consumer Preview Windows 8 Release Preview
Version 5.00 5.33 5.46 5.55
Glyphs 3090 5122 6785 6846
Characters 2864 4547 5092 5217

Supported Unicode Blocks

For further information about which Unicode blocks are supported by the Segoe family of fonts, you can download my extended analysis here:

segoe-analysis.7z
2,825 bytes; SHA-1: DFFA40934DB3305054C40AF3FD6E7224F5CF1EFB

Segoe UI Light Improvements in Windows 8

Windows 7 comes with Segoe UI Light version 5.00/0.90. Windows 8 (as of the Windows Consumer Preview) comes with version 5.15, which has been hinted at various sizes. This comes as a very welcome change, especially with Microsoft using Segoe UI Light all over the place in its latest webpage designs. I recommend grabbing the updated versions of Segoe UI from Windows 8 for your Windows 7 or Windows Vista machines.

As others have complained, the lack of hinting in version 5.00 is particularly noticeable with lowercase bs, ds, ps and qs, the ‘round parts’ of which don’t line up well with other characters. The heights of numerals are also variable at some sizes.

Have a look at the following screenshots for a better idea of the differences (click the images to see the full sizes).

Version 5.00

Screenshot of Segoe UI Light 5.00

Version 5.15

Screenshot of Segoe UI Light 5.15

Difference

Screenshot of the difference between Segoe UI Light 5.15 and Segoe UI Light 5.00

Drawing non-themed push buttons in Windows

When visual styles are enabled in Windows, one may use the DrawThemeBackground function to draw themed push buttons. However, users of Windows XP, Windows Vista and Windows 7 can disable visual styles by selecting the Windows Classic theme or one of the High Contrast themes (and in Windows 2000 and earlier, visual styles weren’t available at all). The classic theming mode has been removed in Windows 8 (I have written about this previously), so in that OS the visual styles APIs should always be available. I suspect it will be a long time before NT6.1 and earlier versions of Windows constitute an insignificant share of the market, though, so this post should be useful until then.Screenshot of Non-Themed Buttons

There are four states that a non-themed button can be in: normal, pressed, defaulted or inactive. How can we draw these states?

The rough non-themed equivalent of the DrawThemeBackground function is the DrawFrameControl function. It has a parameter uType that specifies the type of the frame control to draw – in our case, this should be DFC_BUTTON (= 4). The next parameter is uState. We should set this to DFCS_BUTTONPUSH (=0x0010). For the normal state, this is all that needs to be done. For the inactive state, we should set uType to DFCS_INACTIVE (=0x0100) | DFCS_BUTTONPUSH (in fact, this doesn’t seem to change the appearance of the button frame; the button content/text should be rendered as gray, but that’s out of the scope of this article).

When a non-themed button is pressed or defaulted, it has a single pixel border drawn around it, and the frame control’s bounding rectangle is contracted by 1 pixel on each side. The border’s colour is that of the window frame (COLOR_WINDOWFRAME = 6) – you can use the GetSysColorBrush function to get the appropriate brush. For the defaulted state, just call DrawFrameControl with uType set to DFCS_BUTTONPUSH (with the deflated rectangle). For the pressed state, it might seem like DFCS_PUSHED should be used for uType, but this creates an appearance different to that of standard push buttons. This style is used elsewhere, like on the Windows taskbar, for scrollbar buttons and window caption buttons, etc. Internet Explorer’s owner/custom-drawn buttons also use this style, and I’m sure many other programs do, too. It should be avoided, however, if you’re seeking the native appearance. To properly imitate a pressed push button, avoid using the DrawFrameControl function and use the FrameRect function to draw an inner border with the button shadow colour (COLOR_BTNSHADOW = 16). It’s important to then use the FillRect function to draw the background with the button face colour (COLOR_BTNFACE = 15).

Here’s some pseudocode to illustrate the whole process:

In addition to drawing the background, note that for all states but pressed, the content (text) should be shifted one pixel left and one pixel up. When the button is pressed, it should move one pixel right and one pixel down, so it is centred in the button. Some owner/custom-draw implementations neglect this detail.