Font Use

Visual Studio’s environment font service

Use Visual Studio’s environment font service to ensure a consistent font appearance throughout the integrated development environment (IDE). Certain editors are an exception; these may use either the font service or be user-customizable via a setting in the Tools > Options menu.

When the environment font is used, the UI responds to system settings changes by using the system’s Display Properties dialog and accessibility tools.

The default interface font, which is mapped to a system setting, will appear as Segoe UI 9pt on Vista, Windows 7, and Windows 8. UX designers should specify “the Visual Studio environment font” when creating UI specifications.

Accessing the environment font

Access the environment font by calling the IUIHostLocale::GetDialogFont service.

Managed UI, such as dialogs and other UI elements created in WPF, require special handling in order to correctly set the font to the Visual Studio environment font. For instance, HTML Designer has a View page that allows for customization of the foreground and background.

Text formatting

Font size

Use Visual Studio’s environment font service to ensure a consistent font appearance throughout the integrated development environment (IDE). Certain editors are an exception; these may use either the font service or be user-customizable via a setting in the Tools > Options menu.

The standard point size used by the font service throughout the Visual Studio UI is same as the Windows default, which is 9 point. There are instances in which another font size is used: environment font +2, which would be 11 point given the Windows default size. In no situation should environment font +1, +3, or +4 be used.

Avoid specifying smaller point sizes in the resource file as a queue for localization teams to adjust size for localized text. With WPF-based UI, a small default point size contributes to downstream localizability issues.

An example of environment font +2 usage is for the titles of hubs, as seen in this example of Code Review:

Team explorer window highlighting env font +2

Bold text

Bold text should be limited to question labels in wizards or to convey particular meaning, as in the common conventions of designating the active project in Solution Explorer, overridden values in the Winform properties tool window, events with code behind in the Visual Basic editor (the dropdowns at the top should be bold), and server generated content in the document outline for web pages.

Other weights

Do not use italic text, including italic + bold.

Text casing

Title case

As its name suggests, title casing is a style in which the first letter of certain words are capitalized for the titles of books, films, music albums, and so on for the purpose of emphasis and name recognition. In Visual Studio, title case is reserved for certain items, including:

  • Tooltips. Do not end the tooltip with a period. Example: “Preview Selected Items”

  • Table field labels. Example: “Browse to URL”

  • Column headers. Example: “System Response”

  • Menus, including menu items and context menus. Example: “Save All”

For title case, capitalize all nouns, verbs (including "is" and other forms of "to be”), adverbs (including "than" and "when"), adjectives (including "this" and "that"), and pronouns (including the possessive "its” as well as “it’s”, a contraction of the pronoun “it” and verb “is”).

Capitalize prepositions that are part of a verb phrase, for example “Closing Out All Windows” or “Shutting Down the System”.

Capitalize the second word in compound words if it is a noun or proper adjective or the words have equal weight: Cross-Reference, Pre-Microsoft Software, Read/Write Access, Run-Time.

Capitalize all letters of an initialism, which is a form of abbreviation. Examples include HTML, XML, URL, IDE, and RGB.

Lowercase the second word if it is another part of speech or a participle modifying the first word: How-to, Take-off.

Lowercase articles (a, an, the) unless it is the first word in the title.

Lowercase coordinate conjunctions (and, but, for, nor, or) and compound prepositions of four or fewer letters including “ahead of”, “as for”, “out of”, and “on top of”.

Lowercase "to" in an infinitive phrase, for example "How to Format Your Hard Disk".

Sentence case

Sentence case is the standard capitalization method for writing in which only the first word of the sentence is capitalized, as well as any proper nouns and the pronoun “I”. Use sentence case for:

  • Status bar messages. These are simple, short, and provide only status information.
    Example: “Currently saving file to disk”

  • All other UI elements, including labels, check boxes, radio buttons, and list box items.
    Example: “Select all items in list”

Use Title Case for:

Use sentence case for:

Dialog Title

Labels (other than table labels)

Group Boxes

Check boxes

Menus

Radio buttons

Context Menus

List box items

Buttons

Status bar

Table Labels

Column Headers

Tooltips

Upper case

Upper casing is reserved for tool window titles only. The casing of these titles is handled by the shell so there is no need to specify the casing.

Lower case

Do not use lower case titles or labels in Visual Studio.