Windows local user fonts

Font Installation and Deletion

An application can use a font to draw text only if that font is either resident on a specified device or installed in the system font table. The font table is an internal array that identifies all nondevice fonts that are available to an application. An application can retrieve the names of fonts currently installed on a device or stored in the internal font table by calling the EnumFontFamilies or ChooseFont functions.

To temporarily install a font, call AddFontResource or AddFontResourceEx. These functions load a font that is stored in a font-resource file. However, this is a temporary installation because after a reboot the font will not be present.

To install a font that will remain after the system is rebooted, use one of the following methods:

  • Go to the Control Panel, click the Fonts icon, and select Install New Fonts from the File menu. The font is available to an application even before the reboot. However, in a terminal server situation the font is available for the current session but is not available for other sessions until after a reboot.
  • Copy the font into the %windir%\fonts folder. Then, either go to the Control Panel and click the Fonts icon, or call AddFontResource or AddFontResourceEx. The font is available to an application even before the reboot. However, in a terminal server situation the font is available for the current session but is not available for other sessions until after a reboot. If you only copy the font into the %windir%\fonts folder, the font will be available only after the system is rebooted.

When an application finishes using an installed font, it must remove that font by calling the RemoveFontResource function.

A font installed from a location other than the %windir%\fonts folder cannot be modified when loaded in any active session, including session 0. Any attempt to change, replace, or delete will, therefore, be blocked. If modification to a font is necessary:

  • Temporary fonts get loaded only in the current session. Before attempting any font modifications, call RemoveFontResource to force the current session to unload the font.
  • Permanent fonts remain installed after reboot and are loaded by all created sessions. Call RemoveFontResource to force the current session to unload the font. Then, in the font registry key (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts) find and remove the registry value associated with the font. Finally, reboot the machine to ensure the font isn’t loaded in any session. After reboot, proceed with your font modification/deletion.

Whenever an application calls the functions that add and delete font resources, it should also call the SendMessage function and send a WM_FONTCHANGE message to all top-level windows in the system. This message notifies other applications that the internal font table has been altered by an application that added or removed a font.

Fonts

This design guide was created for Windows 7 and has not been updated for newer versions of Windows. Much of the guidance still applies in principle, but the presentation and examples do not reflect our current design guidance.

Users interact with text more than with any other element in Microsoft Windows. Segoe UI (pronounced «SEE-go») is the Windows system font. The standard font size has been increased to 9 point.

The Segoe UI font.

Segoe UI and Segoe are not the same font. Segoe UI is the Windows font intended for user interface text strings. Segoe is a branding font used by Microsoft and partners to produce material for print and advertising.

Читайте также:  Для чего нужна домашняя группа windows

Segoe UI is an approachable, open, and friendly typeface, and as a result has better readability than Tahoma, Microsoft Sans Serif, and Arial. It has the characteristics of a humanist sans serif: the varying widths of its capitals (narrow E and S, for instance, compared with Helvetica, where the widths are more alike, fairly wide); the stress and letterforms of its lowercase; and its true italic (rather than an «oblique» or slanted roman, like many industrial-looking sans serifs). The typeface is meant to give the same visual effect on screen and in print. It was designed to be a humanist sans serif with no strong character or distracting quirkiness.

Segoe UI is optimized for ClearType, which is on by default in Windows. With ClearType enabled, Segoe UI is an elegant, readable font. Without ClearType enabled, Segoe UI is only marginally acceptable. This factor determines when you should use Segoe UI.

Segoe UI includes Latin, Greek, Cyrillic, and Arabic characters. There are new fonts, also optimized for ClearType, created for other character sets and uses. These include Meiryo for Japanese, Malgun Gothic for Korean, Microsoft JhengHei for Chinese (Traditional), Microsoft YaHei for Chinese (Simplified), Gisha for Hebrew, and Leelawadee for Thai, and the ClearType Collection fonts designed for document use.

Meiryo includes Latin characters based on Verdana. Malgun Gothic, Microsoft JhengHei, and Microsoft YaHei use a customized Segoe UI. Use of italic versions of these fonts is not recommended. Malgun Gothic, Microsoft JhengHei, and Microsoft YaHei are supplied in regular and bold styles only, meaning italic characters are synthesized by slanting the upright styles. Although Meiryo includes true italic and bold italics, these styles only apply to the Latin characters the Japanese characters remain upright when italic styling is applied.

A variation of Meiryo, called Meiryo UI, is preferred in the ribbons command user interface.

To support locales using these character sets, Segoe UI is replaced with the correct fonts depending on each locale during the localization process.

To license Segoe UI and other Microsoft fonts for distribution with a Windows-based program, contact Monotype.

Note: Guidelines related to style and tone and user interface text are presented in separate articles.

Design concepts

Fonts, typefaces, point sizes, and attributes

In traditional typography, a font describes a combination of a typeface, a point size, and attributes. A typeface is the look of the font. Segoe UI, Tahoma, Verdana, and Arial are all typefaces. Point size refers to the size of the font, measured from the top of the ascenders to the bottom of the descenders, minus the internal spacing (called leading). A point is roughly 1/72 inch. Finally, a font can have attributes of bold or italic.

Informally, people often use font in place of typeface as done in this article but technically, Segoe UI is a typeface, not a font. Each combination of attributes is a unique font (for example, 9 point Segoe UI regular, 10 point Segoe UI bold, and so on).

Serif and sans serif

Typefaces are either serif or sans serif. Serif refers to small turns that often finish the strokes of letters in a font. A sans serif typeface doesn’t have serifs.

Readers generally prefer serif fonts used as body text within a document. The serifs provide a feeling of formality and elegance to a document. For UI text, the need for a clean appearance and the lower resolution of computer monitors makes sans serif typefaces the better choice.

Читайте также:  Как заблокировать linux mint

Contrast

Text is easiest to read when there is a large difference between the luminance of the text and the background. Black text on a white background gives the highest contrast dark text on a very light background can provide high contrast as well. This combination is best for primary UI surfaces.

Light text on a dark background offers good contrast, but not as good as dark text on a light background. This combination works well for secondary UI surfaces, such as Explorer task panes, that you want to de-emphasize relative to the primary UI surfaces.

If you want to make sure users read your text, use dark text on a light background.

Affordances

Text can use the following affordances to indicate how it is used:

  • Pointer. The I-bar («text select») pointer indicates that the text is selectable, whereas the left-pointing arrow («normal select») pointer indicates that text isn’t.
  • Caret. When text has input focus, the caret is the flashing vertical bar that indicates the insertion/selection point in selectable or editable text.
  • Box. A box around text that indicates that it’s editable. To reduce the weight of the presentation, the box may be displayed dynamically only when the editable text is selected.
  • Foreground color. Light gray indicates that text is disabled. Non-gray colors, especially blue and purple, indicate that text is a link.
  • Background color. A light gray background weakly suggests that text is read-only, but in practice read-only text can have any color background.

These affordances are combined for the following meanings:

  • Editable. Text displayed in a box, with a text select pointer, a caret (on input focus), and usually on a white background.
  • Read-only, selectable. Text with a select pointer and a caret (on input focus).
  • Read-only, non-selectable. Text with an arrow pointer.
  • Disabled. Light gray text with an arrow pointer, sometimes on a gray background.

Read-only text traditionally has a gray background, but a gray background isn’t necessary. In fact, a gray background can be undesirable, especially for large blocks of text, because it suggests that the text is disabled and discourages reading.

Accessibility and the system font, sizes, and colors

The guidelines for making text accessible to users with disabilities or impairments can be boiled down to one simple rule: Respect the user’s settings by always using the system font, sizes, and colors.

If you do only one thing.

Respect the user’s settings by always using the system font, sizes, and colors.

Developers: From code, you can determine the system font properties (including its size) using the GetThemeFont API function. You can determine the system colors using the GetThemeSysColor API function.

Because you can’t make any assumptions about users’ system theme settings, you should:

  • Always base your font colors and backgrounds off system theme colors. Never make your own colors based on fixed RGB (red, green, blue) values.
  • Always match system text colors with their corresponding background colors. For example, if you choose COLOR_STATICTEXT for the text color, you must also choose COLOR_STATIC for the background color.
  • Always create new fonts based on proportional-sized variations of the system font. Given the system font metrics, you can create bold, italic, larger, and smaller variations.

A simple way to ensure that your program respects users’ settings is to test using a different font size and a high contrast color scheme. All text should resize and display correctly in the chosen color scheme.

How to change system default font in all parts completely

I don’t like cleartype font because it hurts my eyesight. So I tried to change the default font in Windows Vista and 7 as follows. First, I turned off cleartype and changed Segoe UI to Tahoma in ‘Personalize’ menu. Second, I modified Segoe UI to Tahoma in the registry ‘HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Font’.

Читайте также:  Chromium browser для linux

To change default font in not almost but all parts, you must modify registry. But registry modification makes a problem that for example when I click ‘Control Panel>Date and Time’ the window looks ugly because the font size is too large and so some letters are cut outside the window.

Anyone who challenged to change system font and size?
I really wanna Microsoft to give users the option to change system default font and size in all parts completely.

Thank you, Grzegorz Krzymiński. But the method makes default scale larger and cannot reduce font scale in Windows 7.
And the method, which I already know, does not solve my question.

I have searched this site and found a very useful tip except one problem which is mentioned at the end. This problem is what I also wanna solve.
How can I change system default font size to 8, 9 or other? If I discover the solution I can remove font smoothing in all window parts and get appropriate font size.

Below is the summary of how to completely disable ClearType and font smoothing in Windows 7.

1. Disable ClearType by opening “Control Panel->Fonts->Adjust ClearType text” and unchecking “Turn on ClearType”.

Alternatively you can change the value of the following registry key from 2 to 1:

[HKEY_CURRENT_USER\Control Panel\Desktop]
«FontSmoothingType»=dword:00000001

2. Disable font smoothing by unchecking «Smooth edges of screen fonts» in “Control Panel->System->Advanced system settings -> Performance Settings->Visual Effects.

Alternatively you can change the value of the following registry key from 2 to 1:

[HKEY_CURRENT_USER\Control Panel\Desktop]
«FontSmoothing»=»1»

3. Change window elements fonts. To do this, open “Control Panel->Personalize->Window Color->Advanced appearance settings” and change all fonts from Segoe UI 9 to any other font (Windows XP uses Tahoma 8 for all elements by default).

These settings are stored in the following registry path:

4. Now you need to make the system believe that it has no Segoe UI fonts and that it must replace it with for example Таhoma. Please note that there is no need to delete any fonts.
Run regedit.exe and make the following changes in the registry:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts]
«Segoe UI (TrueType)»=»»
«Segoe UI Bold (TrueType)»=»»
«Segoe UI Italic (TrueType)»=»»
«Segoe UI Bold Italic (TrueType)»=»»

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]
«Segoe UI»=»Tahoma»

If you would like to revert it back here are the defaults:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts]
«Segoe UI (TrueType)»=»segoeui.ttf»
«Segoe UI Bold (TrueType)»=»segoeuib.ttf»
«Segoe UI Italic (TrueType)»=»segoeuii.ttf»
«Segoe UI Bold Italic (TrueType)»=»segoeuiz.ttf»
«Segoe UI Semibold (TrueType)»=»seguisb.ttf»
«Segoe UI Light (TrueType)»=»segoeuil.ttf»
«Segoe UI Symbol (TrueType)»=»seguisym.ttf»

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]
«Segoe UI»=-

5. Restart the computer.

Congrats! We are done! Now absolutely in the whole system the user defined fonts are used without any ClearType or smoothing.

In case somebody would like to disable ClearType in the whole system, but enable it in Office 2007 (Office 2007 in Windows XP uses ClearType always, regardless of system settings), then you need to complete all the above steps, except the first one.

It seems to be OK now, we disabled ClearType and font smoothing, changed system fonts, but there is one imperfection.
By default the system uses Segoe UI 9. We changed the font to Tahoma, but the system font size remained the same.

Question remains: How to change the system font size to 8?

Оцените статью